1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

Add transaction number (nonce) to tx list

This commit is contained in:
Dan Finlay 2017-05-21 14:09:44 -07:00
parent c7fd9f4240
commit 6209224a6c
2 changed files with 23 additions and 0 deletions

View File

@ -2,6 +2,8 @@
## Current Master ## Current Master
- Add Transaction Number (nonce) to transaction list.
## 3.6.5 2017-5-17 ## 3.6.5 2017-5-17
- Fix bug where edited gas parameters would not take effect. - Fix bug where edited gas parameters would not take effect.

View File

@ -8,6 +8,7 @@ const explorerLink = require('../../lib/explorer-link')
const CopyButton = require('./copyButton') const CopyButton = require('./copyButton')
const vreme = new (require('vreme')) const vreme = new (require('vreme'))
const Tooltip = require('./tooltip') const Tooltip = require('./tooltip')
const BN = require('ethereumjs-util').BN
const TransactionIcon = require('./transaction-list-item-icon') const TransactionIcon = require('./transaction-list-item-icon')
const ShiftListItem = require('./shift-list-item') const ShiftListItem = require('./shift-list-item')
@ -39,6 +40,8 @@ TransactionListItem.prototype.render = function () {
txParams = transaction.msgParams txParams = transaction.msgParams
} }
const nonce = (new BN(txParams.nonce.substr(2))).toString(10)
const isClickable = ('hash' in transaction && isLinkable) || isPending const isClickable = ('hash' in transaction && isLinkable) || isPending
return ( return (
h(`.transaction-list-item.flex-row.flex-space-between${isClickable ? '.pointer' : ''}`, { h(`.transaction-list-item.flex-row.flex-space-between${isClickable ? '.pointer' : ''}`, {
@ -69,6 +72,24 @@ TransactionListItem.prototype.render = function () {
]), ]),
]), ]),
h(Tooltip, {
title: 'Transaction Number',
position: 'bottom',
},
[
h('span', {
style: {
display: 'flex',
cursor: 'normal',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
padding: '10px',
},
}, nonce),
]),
h('.flex-column', {style: {width: '200px', overflow: 'hidden'}}, [ h('.flex-column', {style: {width: '200px', overflow: 'hidden'}}, [
domainField(txParams), domainField(txParams),
h('div', date), h('div', date),