fix: NaN display on null network fee

This commit is contained in:
Rafael Taranto 2024-03-19 20:24:39 +00:00
parent 8c97a8ac93
commit db09cde2e0

View file

@ -138,7 +138,7 @@ const DetailsRow = ({ it: tx, timezone }) => {
.minus(cashInFee) .minus(cashInFee)
.toFixed(2, 1) // ROUND_DOWN .toFixed(2, 1) // ROUND_DOWN
const crypto = getCryptoAmount(tx) const crypto = getCryptoAmount(tx)
const cryptoFee = getCryptoFeeAmount(tx) const cryptoFee = tx.fee ? `${getCryptoFeeAmount(tx)} ${tx.fiatCode}` : 'N/A'
const exchangeRate = BigNumber(fiat) const exchangeRate = BigNumber(fiat)
.div(crypto) .div(crypto)
.toFixed(2, 1) // ROUND_DOWN .toFixed(2, 1) // ROUND_DOWN
@ -382,7 +382,7 @@ const DetailsRow = ({ it: tx, timezone }) => {
{tx.txClass === 'cashIn' && ( {tx.txClass === 'cashIn' && (
<div className={classes.blockFee}> <div className={classes.blockFee}>
<Label>Network Fee</Label> <Label>Network Fee</Label>
{cryptoFee} {tx.fiatCode} {cryptoFee}
</div> </div>
)} )}
<div className={classes.sessionId}> <div className={classes.sessionId}>