better fix

This commit is contained in:
boufni95 2026-02-04 20:09:15 +00:00
parent d9ec58165f
commit e24fa4f055
2 changed files with 7 additions and 1 deletions

View file

@ -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<Types.AdminInvoiceSwapResponse> {

View file

@ -535,6 +535,10 @@ export default class {
}, txId)
}
async UpdateInvoiceSwap(swapOperationId: string, update: Partial<InvoiceSwap>, txId?: string) {
return this.dbs.Update<InvoiceSwap>('InvoiceSwap', { swap_operation_id: swapOperationId }, update, txId)
}
async SetInvoiceSwapTxId(swapOperationId: string, chainTxId: string, lockupTxHex?: string, txId?: string) {
const update: Partial<InvoiceSwap> = {
tx_id: chainTxId,