From f228f609a43b58f13ebcf8dc0b884e25b0983a87 Mon Sep 17 00:00:00 2001 From: Jack Mallers Date: Wed, 7 Feb 2018 22:52:18 -0600 Subject: [PATCH] fix(null error): fix toLocaleString() on null --- app/components/Contacts/Network.js | 6 ++++++ app/components/Wallet/Wallet.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/app/components/Contacts/Network.js b/app/components/Contacts/Network.js index bacb8dfc..33a47ba8 100644 --- a/app/components/Contacts/Network.js +++ b/app/components/Contacts/Network.js @@ -88,6 +88,12 @@ class Network extends Component { return 'online' } + console.log('balance: ', balance) + console.log('currentTicker: ', currentTicker) + + if (!currentTicker) { return } + if (balance.balanceLoading) { return } + return (
diff --git a/app/components/Wallet/Wallet.js b/app/components/Wallet/Wallet.js index 469290fa..70ca76a8 100644 --- a/app/components/Wallet/Wallet.js +++ b/app/components/Wallet/Wallet.js @@ -31,6 +31,12 @@ class Wallet extends Component { openRequestForm } = this.props + console.log('balance: ', balance) + console.log('currentTicker: ', currentTicker) + + if (!currentTicker) { return } + if (balance.balanceLoading) { return } + const { modalOpen, qrCodeType } = this.state const usdAmount = parseFloat(btc.satoshisToUsd(balance.walletBalance, currentTicker.price_usd)).toLocaleString()