fix: add 2 decimal places to commission

This commit is contained in:
José Oliveira 2022-11-30 15:47:17 +00:00 committed by Rafael
parent a29f3fc13c
commit 0db359afa3

View file

@ -131,8 +131,9 @@ const DetailsRow = ({ it: tx, timezone }) => {
)
const commission = BigNumber(tx.profit).toFixed(2, 1) // ROUND_DOWN
const commissionPercentage =
const commissionPercentage = BigNumber(
Number.parseFloat(tx.commissionPercentage, 2) * 100
).toFixed(2, 1) // ROUND_DOWN
const cashInFee = isCashIn ? Number.parseFloat(tx.cashInFee) : 0
const fiat = BigNumber(tx.fiat)
.minus(cashInFee)