fix: proper amount display for tx in TxTable

This commit is contained in:
fernandomg 2020-04-23 12:48:19 -03:00
parent cdcdd07b23
commit 55eee73ea7
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ export const getTxAmount = (tx: Transaction) => {
if (tx.isTokenTransfer && tx.decodedParams) { if (tx.isTokenTransfer && tx.decodedParams) {
const tokenDecimals = tx.decimals.toNumber ? tx.decimals.toNumber() : tx.decimals const tokenDecimals = tx.decimals.toNumber ? tx.decimals.toNumber() : tx.decimals
txAmount = `${new BigNumber(tx.decodedParams.value).div(10 ** tokenDecimals).toString()} ${tx.symbol}` txAmount = `${new BigNumber(tx.decodedParams.value).div(10 ** tokenDecimals).toFixed()} ${tx.symbol}`
} else if (Number(tx.value) > 0) { } else if (Number(tx.value) > 0) {
txAmount = `${fromWei(toBN(tx.value), 'ether')} ${tx.symbol}` txAmount = `${fromWei(toBN(tx.value), 'ether')} ${tx.symbol}`
} }