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

Commit bf70f2b

Browse files
committed
pay: pass in a proper error to rejectError
In this commit, we ensure that upon a payment error, is properly displayed within the UI itself.
1 parent 27b58ec commit bf70f2b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/lightning-core/pay/reducer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ export const actions = {
4848
.then(() => {
4949
const payments = dispatch(actions.sendPayment())
5050
payments.on('data', function(payment) {
51-
rejectError
5251
}
5352
else {
5453
resolveSuccess
5554
if (payment.payment_error != "") {
55+
// TODO(roasbeef): need to switch and properlu display errors
56+
rejectError({message: "Payment route failure"})
5657
}
5758
})
5859
payments.on('error', rejectError)

0 commit comments

Comments
 (0)