This repository was archived by the owner on Feb 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -105,9 +105,11 @@ class PaymentAction {
105105 } ) ;
106106 stream . on ( 'error' , reject ) ;
107107 stream . write ( JSON . stringify ( { payment_request : invoice } ) , 'utf8' ) ;
108+ this . _nav . goWait ( ) ;
108109 } ) ;
109110 this . _nav . goPayLightningDone ( ) ;
110111 } catch ( err ) {
112+ this . _nav . goPayLightningConfirm ( ) ;
111113 this . _notification . display ( { msg : 'Lightning payment failed!' , err } ) ;
112114 }
113115 await this . _transaction . update ( ) ;
Original file line number Diff line number Diff line change @@ -203,6 +203,7 @@ describe('Action Payments Unit Tests', () => {
203203 JSON . stringify ( { payment_request : 'some-invoice' } ) ,
204204 'utf8'
205205 ) ;
206+ expect ( nav . goWait , 'was called once' ) ;
206207 expect ( nav . goPayLightningDone , 'was called once' ) ;
207208 expect ( notification . display , 'was not called' ) ;
208209 expect ( transaction . update , 'was called once' ) ;
@@ -211,6 +212,7 @@ describe('Action Payments Unit Tests', () => {
211212 it ( 'should display notification on error' , async ( ) => {
212213 paymentsOnStub . withArgs ( 'data' ) . yields ( { payment_error : 'Boom!' } ) ;
213214 await payment . payLightning ( { invoice : 'some-payment' } ) ;
215+ expect ( nav . goPayLightningConfirm , 'was called once' ) ;
214216 expect ( notification . display , 'was called once' ) ;
215217 expect ( transaction . update , 'was called once' ) ;
216218 } ) ;
You can’t perform that action at this time.
0 commit comments