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

Commit 51413f2

Browse files
committed
Change error handling in checkAmountSuppliedAndGoPayLightningConfirm.
Amount will be an empty string when user have not specified in the view before pressing "pay".
1 parent 55985e7 commit 51413f2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/action/payment.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,12 @@ class PaymentAction {
187187
* If payment amount is 0 the function will display a message and return.
188188
*/
189189
async checkAmountSuppliedAndGoPayLightningConfirm() {
190-
if (this._store.payment.amount === '0') {
191-
this._notification.display({ msg: 'Enter amount to pay.' });
192-
} else if (
193-
this._store.payment.destination === '' ||
190+
if (
191+
this._store.payment.amount === '0' ||
194192
this._store.payment.amount === ''
195193
) {
194+
this._notification.display({ msg: 'Enter amount to pay.' });
195+
} else if (this._store.payment.destination === '') {
196196
this._notification.display({ msg: 'Internal Error, try again.' });
197197
this._nav.goHome();
198198
} else {

0 commit comments

Comments
 (0)