Fix inconsistent actionArgs on retry (#1651)

This commit is contained in:
ekzyis 2024-11-26 14:39:05 +01:00 committed by GitHub
parent b0207a2906
commit 8b5e13236b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -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),