mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 02:58:09 +01:00
f4d58ebc70
Account detail view now has an animated transitioning `subview` section that allows us to show extra details within it. Clicking `export` now slide replaces the transaction list with the export UI. Added cancel/done/submit buttons to the Export UI. Done submits like Enter did, the other two transition back to the transaction list. For some reason when first unlocking, the selected account is being instantly replaced with the accounts list, so I need to fix that before merging this into master.
40 lines
1.0 KiB
JavaScript
40 lines
1.0 KiB
JavaScript
const h = require('react-hyperscript')
|
|
const formatBalance = require('../util').formatBalance
|
|
const addressSummary = require('../util').addressSummary
|
|
const explorerLink = require('../../lib/explorer-link')
|
|
|
|
module.exports = function(transactions, network) {
|
|
return h('details', { key: 'transaction-list' }, [
|
|
|
|
h('summary', [
|
|
h('div.font-small', {style: {display: 'inline'}}, 'Transactions'),
|
|
]),
|
|
|
|
h('.flex-row.flex-space-around', [
|
|
h('div.font-small','To'),
|
|
h('div.font-small','Amount'),
|
|
]),
|
|
|
|
h('.tx-list', {
|
|
style: {
|
|
overflowY: 'auto',
|
|
height: '180px',
|
|
},
|
|
},
|
|
|
|
transactions.map((transaction) => {
|
|
return h('.tx.flex-row.flex-space-around', [
|
|
h('a.font-small',
|
|
{
|
|
href: explorerLink(transaction.hash, parseInt(network)),
|
|
target: '_blank',
|
|
},
|
|
addressSummary(transaction.txParams.to)),
|
|
h('div.font-small', formatBalance(transaction.txParams.value))
|
|
])
|
|
})
|
|
)
|
|
|
|
])
|
|
}
|