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}`)
|
||||
}
|
||||
|
||||
const { msatsRequested, actionId } = failedInvoice
|
||||
const { msatsRequested, actionId, actionArgs } = failedInvoice
|
||||
const retryContext = {
|
||||
...incomingContext,
|
||||
optimistic: true,
|
||||
|
@ -265,7 +265,7 @@ export async function retryPaidAction (actionType, args, incomingContext) {
|
|||
actionId
|
||||
}
|
||||
|
||||
const invoiceArgs = await createSNInvoice(actionType, args, retryContext)
|
||||
const invoiceArgs = await createSNInvoice(actionType, actionArgs, retryContext)
|
||||
|
||||
return await models.$transaction(async tx => {
|
||||
const context = { ...retryContext, tx, invoiceArgs }
|
||||
|
@ -282,7 +282,7 @@ export async function retryPaidAction (actionType, args, incomingContext) {
|
|||
})
|
||||
|
||||
// create a new invoice
|
||||
const invoice = await createDbInvoice(actionType, args, context)
|
||||
const invoice = await createDbInvoice(actionType, actionArgs, context)
|
||||
|
||||
return {
|
||||
result: await action.retry({ invoiceId: failedInvoice.id, newInvoiceId: invoice.id }, context),
|
||||
|
|
Loading…
Reference in New Issue