Merge pull request #1754 from RafaelTaranto/backport/commission-rounding

LAM-731 fix: add 2 decimal places to commission
This commit is contained in:
Rafael Taranto 2024-11-29 13:46:06 +00:00 committed by GitHub
commit 2bfafdbc9a

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 fixedFee = Number.parseFloat(tx.fixedFee) || 0
const fiat = BigNumber(tx.fiat)
.minus(fixedFee)