Merge pull request #1269 from josepfo/fix/commissions-ui-rounding

fix: tx commission display value
This commit is contained in:
Rafael Taranto 2022-06-22 15:32:30 +01:00 committed by GitHub
commit 19bfa58160

View file

@ -136,7 +136,9 @@ const DetailsRow = ({ it: tx, timezone }) => {
} }
) )
const commission = getCommission(tx).toFixed(2) const commission = BigNumber(getCommission(tx))
.abs()
.toFixed(2, 1) // ROUND_DOWN
const commissionPercentage = const commissionPercentage =
Number.parseFloat(tx.commissionPercentage, 2) * 100 Number.parseFloat(tx.commissionPercentage, 2) * 100
const cashInFee = isCashIn ? Number.parseFloat(tx.cashInFee) : 0 const cashInFee = isCashIn ? Number.parseFloat(tx.cashInFee) : 0