tmp fix
This commit is contained in:
parent
070aa758d8
commit
1f09bcc679
3 changed files with 9 additions and 1 deletions
|
|
@ -164,7 +164,9 @@ export class Swaps {
|
||||||
await this.storage.paymentStorage.FailInvoiceSwap(swapOpId, result.error, txId)
|
await this.storage.paymentStorage.FailInvoiceSwap(swapOpId, result.error, txId)
|
||||||
this.log("invoice swap failed", { swapOpId, error: result.error })
|
this.log("invoice swap failed", { swapOpId, error: result.error })
|
||||||
}
|
}
|
||||||
}, () => payAddress(swap.address, swap.transaction_amount).then(res => { txId = res.txId }).catch(err => { close(); this.log("error paying address", err) }))
|
}, () => payAddress(swap.address, swap.transaction_amount)
|
||||||
|
.then(res => { txId = res.txId })
|
||||||
|
.catch(err => { close(); this.log("error paying address", err.message || err) }))
|
||||||
}
|
}
|
||||||
|
|
||||||
ResumeInvoiceSwaps = async () => {
|
ResumeInvoiceSwaps = async () => {
|
||||||
|
|
|
||||||
|
|
@ -271,6 +271,10 @@ export class AdminManager {
|
||||||
return { quotes }
|
return { quotes }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TMP_FIX_ADMIN_TX_ID = async () => {
|
||||||
|
await this.storage.paymentStorage.SetInvoiceSwapTxId("6089e1e5-2178-418e-ae19-d32ac5eb1a84", "f997b521ce1374a85e40a0fee5ad40692338b0f5965002b9f07d141cdbe03036")
|
||||||
|
}
|
||||||
|
|
||||||
async PayAdminInvoiceSwap(req: Types.PayAdminInvoiceSwapRequest): Promise<Types.AdminInvoiceSwapResponse> {
|
async PayAdminInvoiceSwap(req: Types.PayAdminInvoiceSwapRequest): Promise<Types.AdminInvoiceSwapResponse> {
|
||||||
const txId = await new Promise<string>(res => {
|
const txId = await new Promise<string>(res => {
|
||||||
this.swaps.PayInvoiceSwap("admin", req.swap_operation_id, req.sat_per_v_byte, async (addr, amt) => {
|
this.swaps.PayInvoiceSwap("admin", req.swap_operation_id, req.sat_per_v_byte, async (addr, amt) => {
|
||||||
|
|
@ -288,6 +292,7 @@ export class AdminManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.storage.paymentStorage.SetInvoiceSwapTxId(req.swap_operation_id, txId, lockupTxHex)
|
await this.storage.paymentStorage.SetInvoiceSwapTxId(req.swap_operation_id, txId, lockupTxHex)
|
||||||
|
this.log("saved admin swap txid", { swapOpId: req.swap_operation_id, txId })
|
||||||
res(tx.txid)
|
res(tx.txid)
|
||||||
return { txId: tx.txid }
|
return { txId: tx.txid }
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@ export const initMainHandler = async (log: PubLogger, settingsManager: SettingsM
|
||||||
await mainHandler.appUserManager.CleanupInactiveUsers()
|
await mainHandler.appUserManager.CleanupInactiveUsers()
|
||||||
await mainHandler.appUserManager.CleanupNeverActiveUsers()
|
await mainHandler.appUserManager.CleanupNeverActiveUsers()
|
||||||
await swaps.ResumeInvoiceSwaps()
|
await swaps.ResumeInvoiceSwaps()
|
||||||
|
await adminManager.TMP_FIX_ADMIN_TX_ID()
|
||||||
await mainHandler.paymentManager.watchDog.Start()
|
await mainHandler.paymentManager.watchDog.Start()
|
||||||
return { mainHandler, apps, localProviderClient, wizard, adminManager }
|
return { mainHandler, apps, localProviderClient, wizard, adminManager }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue