mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add nonce to transaction details (#8716)
This commit is contained in:
parent
991ef366d7
commit
c8de0b70fa
@ -474,7 +474,7 @@ describe('MetaMask', function () {
|
|||||||
const popoverCloseButton = await driver.findClickableElement(By.css('.popover-header__button'))
|
const popoverCloseButton = await driver.findClickableElement(By.css('.popover-header__button'))
|
||||||
const txGasPrices = await driver.findElements(By.css('.transaction-breakdown__value'))
|
const txGasPrices = await driver.findElements(By.css('.transaction-breakdown__value'))
|
||||||
const txGasPriceLabels = await driver.findElements(By.css('.transaction-breakdown-row__title'))
|
const txGasPriceLabels = await driver.findElements(By.css('.transaction-breakdown-row__title'))
|
||||||
await driver.wait(until.elementTextMatches(txGasPrices[3], /^10$/), 10000)
|
await driver.wait(until.elementTextMatches(txGasPrices[4], /^10$/), 10000)
|
||||||
assert(txGasPriceLabels[2])
|
assert(txGasPriceLabels[2])
|
||||||
await popoverCloseButton.click()
|
await popoverCloseButton.click()
|
||||||
})
|
})
|
||||||
|
@ -16,6 +16,7 @@ export default class TransactionBreakdown extends PureComponent {
|
|||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
nativeCurrency: PropTypes.string,
|
nativeCurrency: PropTypes.string,
|
||||||
showFiat: PropTypes.bool,
|
showFiat: PropTypes.bool,
|
||||||
|
nonce: PropTypes.string,
|
||||||
gas: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
gas: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||||
gasPrice: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
gasPrice: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||||
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||||
@ -29,13 +30,22 @@ export default class TransactionBreakdown extends PureComponent {
|
|||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { t } = this.context
|
const { t } = this.context
|
||||||
const { gas, gasPrice, value, className, nativeCurrency, showFiat, totalInHex, gasUsed } = this.props
|
const { gas, gasPrice, value, className, nonce, nativeCurrency, showFiat, totalInHex, gasUsed } = this.props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classnames('transaction-breakdown', className)}>
|
<div className={classnames('transaction-breakdown', className)}>
|
||||||
<div className="transaction-breakdown__title">
|
<div className="transaction-breakdown__title">
|
||||||
{ t('transaction') }
|
{ t('transaction') }
|
||||||
</div>
|
</div>
|
||||||
|
<TransactionBreakdownRow title="Nonce">
|
||||||
|
{typeof nonce !== 'undefined'
|
||||||
|
? (
|
||||||
|
<HexToDecimal
|
||||||
|
className="transaction-breakdown__value"
|
||||||
|
value={nonce}
|
||||||
|
/>
|
||||||
|
) : null
|
||||||
|
}
|
||||||
|
</TransactionBreakdownRow>
|
||||||
<TransactionBreakdownRow title={t('amount')}>
|
<TransactionBreakdownRow title={t('amount')}>
|
||||||
<UserPreferencedCurrencyDisplay
|
<UserPreferencedCurrencyDisplay
|
||||||
className="transaction-breakdown__value"
|
className="transaction-breakdown__value"
|
||||||
|
@ -246,6 +246,7 @@ export default class TransactionListItemDetails extends PureComponent {
|
|||||||
</div>
|
</div>
|
||||||
<div className="transaction-list-item-details__cards-container">
|
<div className="transaction-list-item-details__cards-container">
|
||||||
<TransactionBreakdown
|
<TransactionBreakdown
|
||||||
|
nonce={transactionGroup.initialTransaction.txParams.nonce}
|
||||||
transaction={transaction}
|
transaction={transaction}
|
||||||
className="transaction-list-item-details__transaction-breakdown"
|
className="transaction-list-item-details__transaction-breakdown"
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user