1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 02:58:09 +01:00
metamask-extension/ui/app/components/transaction-list.js
Dan Finlay f4d58ebc70 Move account export to subview
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.
2016-05-04 18:08:31 -07:00

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))
])
})
)
])
}