From cc7dbace38bc41bb177738586e9a60adf541d2ab Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 23 Jun 2016 15:25:33 -0700 Subject: [PATCH] tx-conf add non-interactive mode for notification --- app/scripts/lib/notifications.js | 1 + ui/app/components/panel.js | 6 +++--- ui/app/components/pending-tx.js | 25 +++++++++++++++++-------- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js index b04673620..1b8118490 100644 --- a/app/scripts/lib/notifications.js +++ b/app/scripts/lib/notifications.js @@ -119,6 +119,7 @@ function createMsgNotification (opts) { function transactionNotificationSVG(opts, cb){ var state = { + nonInteractive: true, txData: { txParams: { from: '0x5fda30bb72b8dfe20e48a00dfc108d0915be9bb0', diff --git a/ui/app/components/panel.js b/ui/app/components/panel.js index cbdc82982..3efd3c661 100644 --- a/ui/app/components/panel.js +++ b/ui/app/components/panel.js @@ -27,9 +27,9 @@ Panel.prototype.render = function () { // account identicon h('.identicon-wrapper.flex-column.select-none', [ - h(Identicon, { - address: state.identiconKey, - }), + // h(Identicon, { + // address: state.identiconKey, + // }), h('span.font-small', state.identiconLabel), ]), diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js index d3bfbbc62..e63eba700 100644 --- a/ui/app/components/pending-tx.js +++ b/ui/app/components/pending-tx.js @@ -67,16 +67,25 @@ PendingTx.prototype.renderGeneric = function (h, state) { ]), // send + cancel - h('.flex-row.flex-space-around', [ - h('button', { - onClick: state.cancelTransaction, - }, 'Cancel'), - h('button', { - onClick: state.sendTransaction, - }, 'Send'), - ]), + state.nonInteractive ? null : actionButtons(state), + ]) ) + } +function actionButtons(state){ + return ( + + h('.flex-row.flex-space-around', [ + h('button', { + onClick: state.cancelTransaction, + }, 'Cancel'), + h('button', { + onClick: state.sendTransaction, + }, 'Send'), + ]) + + ) +} \ No newline at end of file