From 6041ba1ed24b16ec2614c954b05ab03488301d72 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 16 Aug 2016 14:07:06 -0700 Subject: Add fallback to API failure. --- ui/app/components/account-eth-balance.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ui/app/components/account-eth-balance.js') diff --git a/ui/app/components/account-eth-balance.js b/ui/app/components/account-eth-balance.js index 4cdab235a..260444688 100644 --- a/ui/app/components/account-eth-balance.js +++ b/ui/app/components/account-eth-balance.js @@ -59,6 +59,10 @@ EthBalanceComponent.prototype.renderBalance = function (value, state) { balance = balanceObj.balance } + if (fiatNumber !== 'N/A') { + fiatNumber = fiatNumber.toFixed(2) + } + var label = balanceObj.label return ( @@ -109,7 +113,7 @@ EthBalanceComponent.prototype.renderBalance = function (value, state) { fontSize: '12px', color: '#333333', }, - }, `= ${fiatNumber.toFixed(2)}`), + }, `= ${fiatNumber}`), h('div', { style: { color: '#AEAEAE', -- cgit