fix: exchange rate display in transaction card
This commit is contained in:
parent
ef8ad829d2
commit
6d4f3b0f06
1 changed files with 3 additions and 1 deletions
|
|
@ -125,7 +125,9 @@ const DetailsRow = ({ it: tx, timezone }) => {
|
||||||
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
|
||||||
const fiat = Number.parseFloat(tx.fiat)
|
const fiat = BigNumber(tx.fiat)
|
||||||
|
.minus(cashInFee)
|
||||||
|
.toFixed(2, 1) // ROUND_DOWN
|
||||||
const crypto = getCryptoAmount(tx)
|
const crypto = getCryptoAmount(tx)
|
||||||
const exchangeRate = (fiat / crypto).toFixed(2)
|
const exchangeRate = (fiat / crypto).toFixed(2)
|
||||||
const displayExRate = `1 ${tx.cryptoCode} = ${exchangeRate} ${tx.fiatCode}`
|
const displayExRate = `1 ${tx.cryptoCode} = ${exchangeRate} ${tx.fiatCode}`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue