Skip to content

Commit

Permalink
Closes #248 - validation check for undefined tokens and amounts
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisfenos committed Oct 9, 2018
1 parent fac17b6 commit 0199f9e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/screens/main/portfolio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,14 @@ class Portfolio extends Component {
<View style={ styles.listItemValueComponent }>
<Text style={styles.listItemCryptoValue}>
{
tokenAmounts.amount
tokenAmounts == null ? 0 : tokenAmounts.amount
}
</Text>
<Text style={styles.listItemFiatValue}>
{ (tokenPriceInfo)[this.props.currencyOptions[this.state.currencyIndex]] }
{
tokenAmounts == null ? 'NA' : (tokenPriceInfo)[this.props.currencyOptions[this.state.currencyIndex]]

}
</Text>
</View>
</View>
Expand Down

0 comments on commit 0199f9e

Please sign in to comment.