This repository was archived by the owner on Feb 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 11 files changed +36
-16
lines changed Expand file tree Collapse file tree 11 files changed +36
-16
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ class NavAction {
9696 this . _reset ( 'Main' , 'LoaderSyncing' ) ;
9797 }
9898
99- goWait ( ) {
99+ goWait ( { copy = 'Loading network...' } ) {
100+ this . _store . waitScreenCopy = copy ;
100101 this . _navigate ( 'Wait' ) ;
101102 }
102103
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ class NavAction {
6969 this . _store . route = 'LoaderSyncing' ;
7070 }
7171
72- goWait ( ) {
72+ goWait ( { copy = 'Loading network...' } ) {
73+ this . _store . waitScreenCopy = copy ;
7374 this . _store . route = 'Wait' ;
7475 }
7576
Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ class PaymentAction {
265265 msg : 'Sending transaction timed out!' ,
266266 } ) ;
267267 } , PAYMENT_TIMEOUT ) ;
268- this . _nav . goWait ( ) ;
268+ this . _nav . goWait ( { copy : 'Sending payment...' } ) ;
269269 try {
270270 await this . _sendPayment ( ) ;
271271 this . _nav . goPayBitcoinDone ( ) ;
@@ -302,7 +302,7 @@ class PaymentAction {
302302 this . _nav . goPaymentFailed ( ) ;
303303 } , PAYMENT_TIMEOUT ) ;
304304 try {
305- this . _nav . goWait ( ) ;
305+ this . _nav . goWait ( { copy : 'Sending payment...' } ) ;
306306 const invoice = this . _store . payment . address ;
307307 const stream = this . _grpc . sendStreamCommand ( 'sendPayment' ) ;
308308 await new Promise ( ( resolve , reject ) => {
Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ class WalletAction {
247247 this . initResetPassword ( ) ;
248248 return this . _notification . display ( { msg : errorMsg } ) ;
249249 }
250- this . _nav . goWait ( ) ;
250+ this . _nav . goWait ( { copy : 'Updating password...' } ) ;
251251 await this . resetPassword ( {
252252 currentPassword : password ,
253253 newPassword : newPassword ,
@@ -396,7 +396,7 @@ class WalletAction {
396396 */
397397 async unlockWallet ( { walletPassword } ) {
398398 try {
399- this . _nav . goWait ( ) ;
399+ this . _nav . goWait ( { } ) ;
400400 await this . _grpc . sendUnlockerCommand ( 'UnlockWallet' , {
401401 walletPassword : toBuffer ( walletPassword ) ,
402402 recoveryWindow : this . _store . settings . restoring ? 250 : 0 ,
@@ -465,7 +465,7 @@ class WalletAction {
465465 if ( this . _store . walletAddress ) {
466466 this . _nav . goNewAddress ( ) ;
467467 } else {
468- this . _nav . goWait ( ) ;
468+ this . _nav . goWait ( { } ) ;
469469 when ( ( ) => this . _store . walletAddress , ( ) => this . _nav . goNewAddress ( ) ) ;
470470 }
471471 }
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ export class Store {
8989 notifications : [ ] ,
9090 unseenNtfnCount : 0 ,
9191 logs : '' ,
92+ waitScreenCopy : 'Loading network...' ,
9293
9394 // Persistent data
9495 settings : {
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ const ResetPasswordSaved = () => <ResetPinSavedView nav={nav} />;
111111
112112const LoaderSyncing = ( ) => < LoaderSyncingView store = { store } /> ;
113113
114- const Wait = ( ) => < WaitView /> ;
114+ const Wait = ( ) => < WaitView store = { store } /> ;
115115
116116const Home = ( ) => (
117117 < HomeView
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ class MainView extends Component {
9999 < NewAddress store = { store } invoice = { invoice } info = { info } />
100100 ) }
101101 { route === 'LoaderSyncing' && < LoaderSyncing store = { store } /> }
102- { route === 'Wait' && < Wait /> }
102+ { route === 'Wait' && < Wait store = { store } /> }
103103 { route === 'Home' && (
104104 < Home
105105 store = { store }
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { StyleSheet , ActivityIndicator } from 'react-native' ;
3+ import PropTypes from 'prop-types' ;
34import Background from '../component/background' ;
45import MainContent from '../component/main-content' ;
56import Text from '../component/text' ;
@@ -19,17 +20,21 @@ const styles = StyleSheet.create({
1920 } ,
2021} ) ;
2122
22- const WaitView = ( ) => (
23+ const WaitView = ( { store } ) => (
2324 < Background color = { color . blackDark } >
2425 < MainContent style = { styles . content } >
2526 < ActivityIndicator
2627 size = "large"
2728 color = { color . lightPurple }
2829 style = { styles . spinner }
2930 />
30- < Text style = { styles . copy } > Loading network... </ Text >
31+ < Text style = { styles . copy } > { store . waitScreenCopy } </ Text >
3132 </ MainContent >
3233 </ Background >
3334) ;
3435
36+ WaitView . propTypes = {
37+ store : PropTypes . object . isRequired ,
38+ } ;
39+
3540export default WaitView ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { StyleSheet } from 'react-native' ;
3+ import PropTypes from 'prop-types' ;
34import Background from '../component/background' ;
45import MainContent from '../component/main-content' ;
56import { color } from '../component/style' ;
@@ -11,12 +12,16 @@ const styles = StyleSheet.create({
1112 } ,
1213} ) ;
1314
14- const WaitView = ( ) => (
15+ const WaitView = ( { store } ) => (
1516 < Background color = { color . blackDark } >
1617 < MainContent style = { styles . content } >
17- < ContinuousLoadNetworkSpinner msg = "Loading network..." />
18+ < ContinuousLoadNetworkSpinner msg = { store . waitScreenCopy } />
1819 </ MainContent >
1920 </ Background >
2021) ;
2122
23+ WaitView . propTypes = {
24+ store : PropTypes . object . isRequired ,
25+ } ;
26+
2227export default WaitView ;
Original file line number Diff line number Diff line change @@ -192,8 +192,8 @@ storiesOf('Screens', module)
192192 . add ( 'Loader - Syncing Chain (Mobile)' , ( ) => (
193193 < LoaderSyncingMobile store = { store } />
194194 ) )
195- . add ( 'Wait' , ( ) => < Wait /> )
196- . add ( 'Wait (Mobile)' , ( ) => < WaitMobile /> )
195+ . add ( 'Wait' , ( ) => < Wait store = { store } /> )
196+ . add ( 'Wait (Mobile)' , ( ) => < WaitMobile store = { store } /> )
197197 . add ( 'Home' , ( ) => (
198198 < Home
199199 store = { store }
You can’t perform that action at this time.
0 commit comments