Skip to content

Commit

Permalink
Embedded LND: SendPayment: set pass payment_error if failure_reason n…
Browse files Browse the repository at this point in the history
…ot defined
  • Loading branch information
kaloudis committed Nov 29, 2024
1 parent 04bab00 commit f0e20f9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions stores/TransactionsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -575,9 +575,13 @@ export default class TransactionsStore {
this.payment_error =
(implementation === 'embedded-lnd'
? errorToUserFriendly(
new Error(
lnrpc.PaymentFailureReason[result.failure_reason]
)
lnrpc.PaymentFailureReason[result.failure_reason]
? new Error(
lnrpc.PaymentFailureReason[
result.failure_reason
]
)
: result.payment_error
)
: errorToUserFriendly(result.failure_reason)) ||
errorToUserFriendly(result.payment_error);
Expand Down

0 comments on commit f0e20f9

Please sign in to comment.