1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Account for undefined currencies.

This commit is contained in:
Kevin Serrano 2017-09-26 10:09:50 -07:00
parent 31e9dcf470
commit 88ddedfb5a
No known key found for this signature in database
GPG Key ID: BF999DEFC7371BA1

View File

@ -13,6 +13,7 @@ function FiatValue () {
FiatValue.prototype.render = function () { FiatValue.prototype.render = function () {
const props = this.props const props = this.props
const { conversionRate, currentCurrency } = props const { conversionRate, currentCurrency } = props
const renderedCurrency = currentCurrency || ''
const value = formatBalance(props.value, 6) const value = formatBalance(props.value, 6)
@ -28,7 +29,7 @@ FiatValue.prototype.render = function () {
fiatTooltipNumber = 'Unknown' fiatTooltipNumber = 'Unknown'
} }
return fiatDisplay(fiatDisplayNumber, currentCurrency.toUpperCase()) return fiatDisplay(fiatDisplayNumber, renderedCurrency.toUpperCase())
} }
function fiatDisplay (fiatDisplayNumber, fiatSuffix) { function fiatDisplay (fiatDisplayNumber, fiatSuffix) {