Browse Source

fix(toLocaleString): make sure we arent calling toLocaleString on null

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

1
app/components/Contacts/Network.js

@ -94,6 +94,7 @@ class Network extends Component {
<section>
<h2>My Network</h2>
<span className={styles.channelAmount}>
{btc.satoshisToBtc(balance.channelBalance)}BTC ${btc.satoshisToUsd(balance.channelBalance, currentTicker.price_usd) ? btc.satoshisToUsd(balance.channelBalance, currentTicker.price_usd).toLocaleString() : ''}
</span>
</section>
<section className={styles.addChannel} onClick={openContactsForm}>

1
app/components/Wallet/Wallet.js

@ -32,6 +32,7 @@ class Wallet extends Component {
} = this.props
const { modalOpen, qrCodeType } = this.state
const usdAmount = parseFloat(btc.satoshisToUsd(balance.walletBalance, currentTicker.price_usd)) ? parseFloat(btc.satoshisToUsd(balance.walletBalance, currentTicker.price_usd)).toLocaleString() : ''
const changeQrCode = () => {
const qrCodeNum = this.state.qrCodeType === 1 ? 2 : 1

Loading…
Cancel
Save