|
|
@ -26,8 +26,11 @@ export default class TransactionBreakdown extends PureComponent { |
|
|
|
render () { |
|
|
|
render () { |
|
|
|
const { t } = this.context |
|
|
|
const { t } = this.context |
|
|
|
const { transaction, className } = this.props |
|
|
|
const { transaction, className } = this.props |
|
|
|
const { txParams: { gas, gasPrice, value } = {} } = transaction |
|
|
|
const { txParams: { gas, gasPrice, value } = {}, txReceipt: { gasUsed } = {} } = transaction |
|
|
|
const hexGasTotal = getHexGasTotal({ gasLimit: gas, gasPrice }) |
|
|
|
|
|
|
|
|
|
|
|
const gasLimit = typeof gasUsed === 'string' ? gasUsed : gas |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const hexGasTotal = getHexGasTotal({ gasLimit, gasPrice }) |
|
|
|
const totalInHex = sumHexes(hexGasTotal, value) |
|
|
|
const totalInHex = sumHexes(hexGasTotal, value) |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
@ -52,6 +55,19 @@ export default class TransactionBreakdown extends PureComponent { |
|
|
|
value={gas} |
|
|
|
value={gas} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</TransactionBreakdownRow> |
|
|
|
</TransactionBreakdownRow> |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
typeof gasUsed === 'string' && ( |
|
|
|
|
|
|
|
<TransactionBreakdownRow |
|
|
|
|
|
|
|
title={`${t('gasUsed')} (${t('units')})`} |
|
|
|
|
|
|
|
className="transaction-breakdown__row-title" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<HexToDecimal |
|
|
|
|
|
|
|
className="transaction-breakdown__value" |
|
|
|
|
|
|
|
value={gasUsed} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</TransactionBreakdownRow> |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
<TransactionBreakdownRow title={t('gasPrice')}> |
|
|
|
<TransactionBreakdownRow title={t('gasPrice')}> |
|
|
|
<CurrencyDisplay |
|
|
|
<CurrencyDisplay |
|
|
|
className="transaction-breakdown__value" |
|
|
|
className="transaction-breakdown__value" |
|
|
|