Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 27b58ec

Browse files
committed
pay: correct check for payment error on payment attempt
Previously, we checked against a null value, while within the proto itself, the error is actually a string. To fix this, we properly check against an empty string. With this commit, payment errors will now properly display.
1 parent 21b1570 commit 27b58ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/lightning-core/pay/reducer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ export const actions = {
4848
.then(() => {
4949
const payments = dispatch(actions.sendPayment())
5050
payments.on('data', function(payment) {
51-
if (payment.payment_error != null) {
5251
rejectError
5352
}
5453
else {
5554
resolveSuccess
55+
if (payment.payment_error != "") {
5656
}
5757
})
5858
payments.on('error', rejectError)

0 commit comments

Comments
 (0)