diff --git a/src/services/main/adminManager.ts b/src/services/main/adminManager.ts index e01346ab..e9695dc2 100644 --- a/src/services/main/adminManager.ts +++ b/src/services/main/adminManager.ts @@ -273,7 +273,9 @@ export class AdminManager { TMP_FIX_ADMIN_TX_ID = async () => { this.log("fixing tmp admin tx") - await this.storage.paymentStorage.SetInvoiceSwapTxId("6089e1e5-2178-418e-ae19-d32ac5eb1a84", "f997b521ce1374a85e40a0fee5ad40692338b0f5965002b9f07d141cdbe03036") + await this.storage.paymentStorage.UpdateInvoiceSwap("6089e1e5-2178-418e-ae19-d32ac5eb1a84", { + used: false, failure_reason: "", tx_id: "f997b521ce1374a85e40a0fee5ad40692338b0f5965002b9f07d141cdbe03036" + }) } async PayAdminInvoiceSwap(req: Types.PayAdminInvoiceSwapRequest): Promise { diff --git a/src/services/storage/paymentStorage.ts b/src/services/storage/paymentStorage.ts index 34c6d3bf..d14138bd 100644 --- a/src/services/storage/paymentStorage.ts +++ b/src/services/storage/paymentStorage.ts @@ -535,6 +535,10 @@ export default class { }, txId) } + async UpdateInvoiceSwap(swapOperationId: string, update: Partial, txId?: string) { + return this.dbs.Update('InvoiceSwap', { swap_operation_id: swapOperationId }, update, txId) + } + async SetInvoiceSwapTxId(swapOperationId: string, chainTxId: string, lockupTxHex?: string, txId?: string) { const update: Partial = { tx_id: chainTxId,