Browse Source

fix(null error): fix toLocaleString() on null

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
f228f609a4
  1. 6
      app/components/Contacts/Network.js
  2. 6
      app/components/Wallet/Wallet.js

6
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 <span /> }
if (balance.balanceLoading) { return <span /> }
return (
<div className={styles.network}>
<header className={styles.header}>

6
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 <span /> }
if (balance.balanceLoading) { return <span /> }
const { modalOpen, qrCodeType } = this.state
const usdAmount = parseFloat(btc.satoshisToUsd(balance.walletBalance, currentTicker.price_usd)).toLocaleString()

Loading…
Cancel
Save