tx-conf add non-interactive mode for notification

feature/default_network_editable
kumavis 9 years ago
parent 2495c6ea54
commit cc7dbace38
  1. 1
      app/scripts/lib/notifications.js
  2. 6
      ui/app/components/panel.js
  3. 13
      ui/app/components/pending-tx.js

@ -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',

@ -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),
]), ]),

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

Loading…
Cancel
Save