This repository was archived by the owner on Feb 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,10 @@ class NavAction {
7373 this . _store . route = 'PayLightningDone' ;
7474 }
7575
76+ goPaymentFailed ( ) {
77+ this . _store . route = 'PaymentFailed' ;
78+ }
79+
7680 goPayBitcoin ( ) {
7781 this . _store . route = 'PayBitcoin' ;
7882 }
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import Home from './home';
1919import Payment from './payment' ;
2020import PayLightningConfirm from './pay-lightning-confirm' ;
2121import PayLightningDone from './pay-lightning-done' ;
22+ import PaymentFailed from './payment-failed' ;
2223import PayBitcoin from './pay-bitcoin' ;
2324import PayBitcoinConfirm from './pay-bitcoin-confirm' ;
2425import PayBitcoinDone from './pay-bitcoin-done' ;
@@ -111,6 +112,9 @@ class MainView extends Component {
111112 { route === 'PayLightningDone' && (
112113 < PayLightningDone store = { store } payment = { payment } nav = { nav } />
113114 ) }
115+ { route === 'PaymentFailed' && (
116+ < PaymentFailed channel = { channel } payment = { payment } />
117+ ) }
114118 { route === 'PayBitcoin' && (
115119 < PayBitcoin store = { store } payment = { payment } nav = { nav } />
116120 ) }
Original file line number Diff line number Diff line change @@ -130,6 +130,13 @@ describe('Action Nav Unit Tests', () => {
130130 } ) ;
131131 } ) ;
132132
133+ describe ( 'goPaymentFailed()' , ( ) => {
134+ it ( 'should set correct route' , ( ) => {
135+ nav . goPaymentFailed ( ) ;
136+ expect ( store . route , 'to equal' , 'PaymentFailed' ) ;
137+ } ) ;
138+ } ) ;
139+
133140 describe ( 'goPayBitcoin()' , ( ) => {
134141 it ( 'should set correct route' , ( ) => {
135142 nav . goPayBitcoin ( ) ;
You can’t perform that action at this time.
0 commit comments