check invoice after transitioning to cancel
This commit is contained in:
parent
3264601dc6
commit
2ff839f3a5
@ -158,6 +158,8 @@ export async function retryPaidAction (actionType, args, context) {
|
|||||||
const { models, me } = context
|
const { models, me } = context
|
||||||
const { invoiceId } = args
|
const { invoiceId } = args
|
||||||
|
|
||||||
|
console.log('retryPaidAction', actionType, args)
|
||||||
|
|
||||||
const action = paidActions[actionType]
|
const action = paidActions[actionType]
|
||||||
if (!action) {
|
if (!action) {
|
||||||
throw new Error(`retryPaidAction - invalid action type ${actionType}`)
|
throw new Error(`retryPaidAction - invalid action type ${actionType}`)
|
||||||
|
@ -395,7 +395,9 @@ export async function finalizeHodlInvoice ({ data: { hash }, models, lnd, boss,
|
|||||||
|
|
||||||
// if this is an actionType we need to cancel conditionally
|
// if this is an actionType we need to cancel conditionally
|
||||||
if (dbInv.actionType) {
|
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 })
|
await cancelHodlInvoice({ id: hash, lnd })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user