From 2b30c82037bc697464c130b09e845f05d45a388e Mon Sep 17 00:00:00 2001 From: Marcos Rodriguez Date: Wed, 6 Nov 2019 01:06:25 -0500 Subject: [PATCH] Update App.js --- App.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/App.js b/App.js index 8d389a68..e65b2041 100644 --- a/App.js +++ b/App.js @@ -48,13 +48,22 @@ export default class App extends React.Component { .catch(console.error); Linking.addEventListener('url', this.handleOpenURL); AppState.addEventListener('change', this._handleAppStateChange); - QuickActions.popInitialAction().then(this.walletQuickActions); DeviceEventEmitter.addListener('quickActionShortcut', this.walletQuickActions); const isViewAllWalletsEnabled = await OnAppLaunch.isViewAllWalletsEnabled(); if (!isViewAllWalletsEnabled) { const selectedDefaultWallet = await OnAppLaunch.getSelectedDefaultWallet(); - const walletIndex = this.state.wallets.findIndex(wallet => wallet.getID() === selectedDefaultWallet.getID()); - this.handleClick(walletIndex); + const wallet = BlueApp.getWallets().find(wallet => wallet.getID() === selectedDefaultWallet.getID()); + this.navigator.dispatch( + NavigationActions.navigate({ + routeName: 'WalletTransactions', + params: { + wallet, + headerColor: WalletGradient.headerColorFor(wallet.type), + }, + }), + ); + } else { + QuickActions.popInitialAction().then(this.walletQuickActions); } }