fix: proper amount display for tx in TxTable

This commit is contained in:
fernandomg 2020-04-23 12:48:19 -03:00 committed by Mikhail Mikheev
parent edcfd2e32e
commit b46af65fe8
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) {
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) {
txAmount = `${fromWei(toBN(tx.value), 'ether')} ${tx.symbol}`
}