Merge pull request #1754 from RafaelTaranto/backport/commission-rounding
LAM-731 fix: add 2 decimal places to commission
This commit is contained in:
commit
2bfafdbc9a
1 changed files with 2 additions and 1 deletions
|
|
@ -131,8 +131,9 @@ const DetailsRow = ({ it: tx, timezone }) => {
|
||||||
)
|
)
|
||||||
|
|
||||||
const commission = BigNumber(tx.profit).toFixed(2, 1) // ROUND_DOWN
|
const commission = BigNumber(tx.profit).toFixed(2, 1) // ROUND_DOWN
|
||||||
const commissionPercentage =
|
const commissionPercentage = BigNumber(
|
||||||
Number.parseFloat(tx.commissionPercentage, 2) * 100
|
Number.parseFloat(tx.commissionPercentage, 2) * 100
|
||||||
|
).toFixed(2, 1) // ROUND_DOWN
|
||||||
const fixedFee = Number.parseFloat(tx.fixedFee) || 0
|
const fixedFee = Number.parseFloat(tx.fixedFee) || 0
|
||||||
const fiat = BigNumber(tx.fiat)
|
const fiat = BigNumber(tx.fiat)
|
||||||
.minus(fixedFee)
|
.minus(fixedFee)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue