diff --git a/App.js b/App.js index bde218e618..9e286fea20 100644 --- a/App.js +++ b/App.js @@ -12,7 +12,6 @@ import { AppStorage, LightningCustodianWallet } from './class'; import { Chain } from './models/bitcoinUnits'; import QuickActions from 'react-native-quick-actions'; import * as Sentry from '@sentry/react-native'; -import WalletGradient from './class/walletGradient'; import OnAppLaunch from './class/onAppLaunch'; if (process.env.NODE_ENV !== 'development') { diff --git a/screen/wallets/transactions.js b/screen/wallets/transactions.js index d880d3a309..504d0466b0 100644 --- a/screen/wallets/transactions.js +++ b/screen/wallets/transactions.js @@ -355,31 +355,28 @@ export default class WalletTransactions extends Component { }; onWalletSelect = async wallet => { - NavigationService.navigate('WalletTransactions', { - key: `WalletTransactions-${wallet.getID()}`, - }); - /** @type {LightningCustodianWallet} */ - let toAddress = false; - if (this.state.wallet.refill_addressess.length > 0) { - toAddress = this.state.wallet.refill_addressess[0]; - } else { - try { - await this.state.wallet.fetchBtcAddress(); + if (wallet) { + NavigationService.navigate('WalletTransactions', { + key: `WalletTransactions-${wallet.getID()}`, + }); + /** @type {LightningCustodianWallet} */ + let toAddress = false; + if (this.state.wallet.refill_addressess.length > 0) { toAddress = this.state.wallet.refill_addressess[0]; - } catch (Err) { - return alert(Err.message); + } else { + try { + await this.state.wallet.fetchBtcAddress(); + toAddress = this.state.wallet.refill_addressess[0]; + } catch (Err) { + return alert(Err.message); + } } - } - - if (wallet) { this.props.navigation.navigate('SendDetails', { memo: loc.lnd.refill_lnd_balance, fromSecret: wallet.getSecret(), address: toAddress, fromWallet: wallet, }); - } else { - return alert('Internal error'); } };