Fix inconsistent actionArgs on retry (#1651)
This commit is contained in:
parent
b0207a2906
commit
8b5e13236b
@ -256,7 +256,7 @@ export async function retryPaidAction (actionType, args, incomingContext) {
|
|||||||
throw new Error(`retryPaidAction - missing invoice ${actionType}`)
|
throw new Error(`retryPaidAction - missing invoice ${actionType}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const { msatsRequested, actionId } = failedInvoice
|
const { msatsRequested, actionId, actionArgs } = failedInvoice
|
||||||
const retryContext = {
|
const retryContext = {
|
||||||
...incomingContext,
|
...incomingContext,
|
||||||
optimistic: true,
|
optimistic: true,
|
||||||
@ -265,7 +265,7 @@ export async function retryPaidAction (actionType, args, incomingContext) {
|
|||||||
actionId
|
actionId
|
||||||
}
|
}
|
||||||
|
|
||||||
const invoiceArgs = await createSNInvoice(actionType, args, retryContext)
|
const invoiceArgs = await createSNInvoice(actionType, actionArgs, retryContext)
|
||||||
|
|
||||||
return await models.$transaction(async tx => {
|
return await models.$transaction(async tx => {
|
||||||
const context = { ...retryContext, tx, invoiceArgs }
|
const context = { ...retryContext, tx, invoiceArgs }
|
||||||
@ -282,7 +282,7 @@ export async function retryPaidAction (actionType, args, incomingContext) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// create a new invoice
|
// create a new invoice
|
||||||
const invoice = await createDbInvoice(actionType, args, context)
|
const invoice = await createDbInvoice(actionType, actionArgs, context)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
result: await action.retry({ invoiceId: failedInvoice.id, newInvoiceId: invoice.id }, context),
|
result: await action.retry({ invoiceId: failedInvoice.id, newInvoiceId: invoice.id }, context),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user