fix: standardize exchange rate calculation in front-end
This commit is contained in:
parent
6d4f3b0f06
commit
ceaf928ac3
1 changed files with 3 additions and 1 deletions
|
|
@ -129,7 +129,9 @@ const DetailsRow = ({ it: tx, timezone }) => {
|
|||
.minus(cashInFee)
|
||||
.toFixed(2, 1) // ROUND_DOWN
|
||||
const crypto = getCryptoAmount(tx)
|
||||
const exchangeRate = (fiat / crypto).toFixed(2)
|
||||
const exchangeRate = BigNumber(fiat)
|
||||
.div(crypto)
|
||||
.toFixed(2, 1) // ROUND_DOWN
|
||||
const displayExRate = `1 ${tx.cryptoCode} = ${exchangeRate} ${tx.fiatCode}`
|
||||
const discount = tx.discount ? `-${tx.discount}%` : null
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue