From c6b2379507b76525f6689474ff287d32500d9540 Mon Sep 17 00:00:00 2001 From: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Date: Tue, 20 Jan 2026 08:18:41 +0100 Subject: [PATCH] fix: remove accidentally set BTC liquidity limit (#2993) * fix: remove accidentally set BTC liquidity limit The limit field on BTC liquidity_management_rule (id=79) was accidentally set to 0.8863205 on 2026-01-19, causing BuyFiat transactions over ~0.78 BTC to fail with LIQUIDITY_LIMIT_EXCEEDED. This migration sets the limit back to NULL (no limit) for BTC. * fix: improve migration with dbo schema and safety check - Add dbo schema prefix for MSSQL compatibility - Add context='Bitcoin' filter as safety check - Add documentation comments --- .../1768893600000-RemoveBtcLiquidityLimit.js | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 migration/1768893600000-RemoveBtcLiquidityLimit.js diff --git a/migration/1768893600000-RemoveBtcLiquidityLimit.js b/migration/1768893600000-RemoveBtcLiquidityLimit.js new file mode 100644 index 0000000000..5e8e8e63c2 --- /dev/null +++ b/migration/1768893600000-RemoveBtcLiquidityLimit.js @@ -0,0 +1,42 @@ +/** + * @typedef {import('typeorm').MigrationInterface} MigrationInterface + * @typedef {import('typeorm').QueryRunner} QueryRunner + */ + +/** + * Remove accidentally set BTC liquidity limit. + * + * On 2026-01-19 at 16:09 UTC, the limit field on the BTC liquidity_management_rule + * was accidentally set to 0.8863205, causing BuyFiat transactions over ~0.78 BTC + * to fail with LIQUIDITY_LIMIT_EXCEEDED (e.g., transaction 296735). + * + * This migration sets the limit back to NULL (no limit) for BTC. + * + * @class + * @implements {MigrationInterface} + */ +module.exports = class RemoveBtcLiquidityLimit1768893600000 { + name = 'RemoveBtcLiquidityLimit1768893600000'; + + /** + * @param {QueryRunner} queryRunner + */ + async up(queryRunner) { + await queryRunner.query(` + UPDATE "dbo"."liquidity_management_rule" + SET "limit" = NULL + WHERE "id" = 79 AND "context" = 'Bitcoin' + `); + } + + /** + * @param {QueryRunner} queryRunner + */ + async down(queryRunner) { + await queryRunner.query(` + UPDATE "dbo"."liquidity_management_rule" + SET "limit" = 0.8863205 + WHERE "id" = 79 AND "context" = 'Bitcoin' + `); + } +};