Skip to content

Commit

Permalink
refactor(core): decline invoice if amount is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
vindard committed Feb 22, 2024
1 parent e611a41 commit ee294b7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/api/src/app/wallets/update-single-pending-invoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,14 @@ const processPendingInvoice = async ({
currency: WalletCurrency.Btc,
})
if (receivedBtc instanceof Error) {
return ProcessPendingInvoiceResult.processAsPaidWithError(receivedBtc)
recordExceptionInCurrentSpan({
error: receivedBtc,
level: receivedBtc.level,
})
return processPendingInvoiceForDecline({
walletInvoice,
logger: pendingInvoiceLogger,
})
}

// Continue in lock
Expand Down

0 comments on commit ee294b7

Please sign in to comment.