Only retry same receiver if forward did not fail
This commit is contained in:
parent
b301b31a46
commit
7a8db53ecf
@ -326,9 +326,10 @@ export async function retryPaidAction (actionType, args, incomingContext) {
|
|||||||
withdrawl: true
|
withdrawl: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (invoiceForward) {
|
// TODO: receiver fallbacks
|
||||||
// TODO: receiver fallbacks
|
// use next receiver wallet if forward failed (we currently immediately fallback to SN)
|
||||||
// use next receiver wallet if forward failed
|
const failedForward = invoiceForward?.withdrawl && invoiceForward.withdrawl.actionState !== 'CONFIRMED'
|
||||||
|
if (invoiceForward && !failedForward) {
|
||||||
const { userId } = invoiceForward.wallet
|
const { userId } = invoiceForward.wallet
|
||||||
const { invoice: bolt11, wrappedInvoice: wrappedBolt11, wallet, maxFee } = await createWrappedInvoice(userId, {
|
const { invoice: bolt11, wrappedInvoice: wrappedBolt11, wallet, maxFee } = await createWrappedInvoice(userId, {
|
||||||
msats: failedInvoice.msatsRequested,
|
msats: failedInvoice.msatsRequested,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user