Merge remote-tracking branch 'origin/release-8.1.10' into merge-8.1-into-9
This commit is contained in:
commit
d18b5bb29d
8 changed files with 1443 additions and 790 deletions
|
|
@ -89,6 +89,17 @@ const CANCEL_CASH_IN_TRANSACTION = gql`
|
|||
const getCryptoAmount = tx =>
|
||||
coinUtils.toUnit(new BigNumber(tx.cryptoAtoms), tx.cryptoCode).toNumber()
|
||||
|
||||
const getCryptoFeeAmount = tx => {
|
||||
const feeAmount = coinUtils
|
||||
.toUnit(new BigNumber(tx.cryptoAtoms), tx.cryptoCode)
|
||||
.toNumber()
|
||||
|
||||
return new BigNumber(feeAmount)
|
||||
.times(tx.rawTickerPrice)
|
||||
.toNumber()
|
||||
.toFixed(2, 1)
|
||||
}
|
||||
|
||||
const formatAddress = (cryptoCode = '', address = '') =>
|
||||
coinUtils.formatCryptoAddress(cryptoCode, address).replace(/(.{5})/g, '$1 ')
|
||||
|
||||
|
|
@ -129,6 +140,7 @@ const DetailsRow = ({ it: tx, timezone }) => {
|
|||
.minus(cashInFee)
|
||||
.toFixed(2, 1) // ROUND_DOWN
|
||||
const crypto = getCryptoAmount(tx)
|
||||
const cryptoFee = getCryptoFeeAmount(tx)
|
||||
const exchangeRate = BigNumber(fiat)
|
||||
.div(crypto)
|
||||
.toFixed(2, 1) // ROUND_DOWN
|
||||
|
|
@ -369,6 +381,12 @@ const DetailsRow = ({ it: tx, timezone }) => {
|
|||
)}
|
||||
</div>
|
||||
</div>
|
||||
{tx.txClass === 'cashIn' && (
|
||||
<div className={classes.blockFee}>
|
||||
<Label>Network Fee</Label>
|
||||
{cryptoFee} {tx.fiatCode}
|
||||
</div>
|
||||
)}
|
||||
<div className={classes.sessionId}>
|
||||
<Label>Session ID</Label>
|
||||
<CopyToClipboard>{tx.id}</CopyToClipboard>
|
||||
|
|
|
|||
|
|
@ -90,6 +90,9 @@ export default {
|
|||
transactionId: {
|
||||
width: 280
|
||||
},
|
||||
blockFee: {
|
||||
width: 140
|
||||
},
|
||||
sessionId: {
|
||||
width: 215
|
||||
},
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ const GET_TRANSACTIONS = gql`
|
|||
errorCode
|
||||
deviceId
|
||||
fiat
|
||||
fee
|
||||
cashInFee
|
||||
fiatCode
|
||||
cryptoAtoms
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue