mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 18:41:38 +01:00
Default currency-display valueToRender to empty string when not readOnly ('0' if readOnly).
This commit is contained in:
parent
1b879f45bc
commit
ffd42c59da
@ -49,8 +49,8 @@ CurrencyDisplay.prototype.getAmount = function (value) {
|
|||||||
: toHexWei(value)
|
: toHexWei(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrencyDisplay.prototype.getValueToRender = function ({ selectedToken, conversionRate, value }) {
|
CurrencyDisplay.prototype.getValueToRender = function ({ selectedToken, conversionRate, value, readOnly }) {
|
||||||
if (value === '0x0') return '0'
|
if (value === '0x0') return readOnly ? '0' : ''
|
||||||
const { decimals, symbol } = selectedToken || {}
|
const { decimals, symbol } = selectedToken || {}
|
||||||
const multiplier = Math.pow(10, Number(decimals || 0))
|
const multiplier = Math.pow(10, Number(decimals || 0))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user