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

tx-conf add non-interactive mode for notification

This commit is contained in:
kumavis 2016-06-23 15:25:33 -07:00
parent 2495c6ea54
commit cc7dbace38
3 changed files with 21 additions and 11 deletions

View File

@ -119,6 +119,7 @@ function createMsgNotification (opts) {
function transactionNotificationSVG(opts, cb){ function transactionNotificationSVG(opts, cb){
var state = { var state = {
nonInteractive: true,
txData: { txData: {
txParams: { txParams: {
from: '0x5fda30bb72b8dfe20e48a00dfc108d0915be9bb0', from: '0x5fda30bb72b8dfe20e48a00dfc108d0915be9bb0',

View File

@ -27,9 +27,9 @@ Panel.prototype.render = function () {
// account identicon // account identicon
h('.identicon-wrapper.flex-column.select-none', [ h('.identicon-wrapper.flex-column.select-none', [
h(Identicon, { // h(Identicon, {
address: state.identiconKey, // address: state.identiconKey,
}), // }),
h('span.font-small', state.identiconLabel), h('span.font-small', state.identiconLabel),
]), ]),

View File

@ -67,16 +67,25 @@ PendingTx.prototype.renderGeneric = function (h, state) {
]), ]),
// send + cancel // send + cancel
h('.flex-row.flex-space-around', [ state.nonInteractive ? null : actionButtons(state),
h('button', {
onClick: state.cancelTransaction,
}, 'Cancel'),
h('button', {
onClick: state.sendTransaction,
}, 'Send'),
]),
]) ])
) )
} }
function actionButtons(state){
return (
h('.flex-row.flex-space-around', [
h('button', {
onClick: state.cancelTransaction,
}, 'Cancel'),
h('button', {
onClick: state.sendTransaction,
}, 'Send'),
])
)
}