check invoice after transitioning to cancel

This commit is contained in:
k00b 2024-08-18 18:03:01 -05:00
parent 3264601dc6
commit 2ff839f3a5
2 changed files with 5 additions and 1 deletions

View File

@ -158,6 +158,8 @@ export async function retryPaidAction (actionType, args, context) {
const { models, me } = context
const { invoiceId } = args
console.log('retryPaidAction', actionType, args)
const action = paidActions[actionType]
if (!action) {
throw new Error(`retryPaidAction - invalid action type ${actionType}`)

View File

@ -395,7 +395,9 @@ export async function finalizeHodlInvoice ({ data: { hash }, models, lnd, boss,
// if this is an actionType we need to cancel conditionally
if (dbInv.actionType) {
return await paidActionCanceling({ data: { invoiceId: dbInv.id }, models, lnd, boss })
await paidActionCanceling({ data: { invoiceId: dbInv.id }, models, lnd, boss })
await checkInvoice({ data: { hash }, models, lnd, ...args })
return
}
await cancelHodlInvoice({ id: hash, lnd })