diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-02-24 03:18:49 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-02-24 03:18:49 +0800 |
commit | 7ec25526b70473247a69ab4a3a1302e50b06f12b (patch) | |
tree | 34902786924b1ca9440caec0b6c5f4c255d594dd | |
parent | 564f920ae0a1be1aa08905f1b4cf6d081e9a5a0b (diff) | |
download | tangerine-wallet-browser-7ec25526b70473247a69ab4a3a1302e50b06f12b.tar tangerine-wallet-browser-7ec25526b70473247a69ab4a3a1302e50b06f12b.tar.gz tangerine-wallet-browser-7ec25526b70473247a69ab4a3a1302e50b06f12b.tar.bz2 tangerine-wallet-browser-7ec25526b70473247a69ab4a3a1302e50b06f12b.tar.lz tangerine-wallet-browser-7ec25526b70473247a69ab4a3a1302e50b06f12b.tar.xz tangerine-wallet-browser-7ec25526b70473247a69ab4a3a1302e50b06f12b.tar.zst tangerine-wallet-browser-7ec25526b70473247a69ab4a3a1302e50b06f12b.zip |
Add alternate UI for pending personal_sign messages
-rw-r--r-- | app/scripts/lib/message-manager.js | 3 | ||||
-rw-r--r-- | app/scripts/lib/personal-message-manager.js | 1 | ||||
-rw-r--r-- | ui/app/components/pending-personal-msg.js | 9 | ||||
-rw-r--r-- | ui/app/conf-tx.js | 17 |
4 files changed, 15 insertions, 15 deletions
diff --git a/app/scripts/lib/message-manager.js b/app/scripts/lib/message-manager.js index ceaf8ee2f..711d5f159 100644 --- a/app/scripts/lib/message-manager.js +++ b/app/scripts/lib/message-manager.js @@ -33,6 +33,7 @@ module.exports = class MessageManager extends EventEmitter{ msgParams: msgParams, time: time, status: 'unapproved', + type: 'eth_sign', } this.addMsg(msgData) @@ -115,4 +116,4 @@ function normalizeMsgData(data) { // data is unicode, convert to hex return ethUtil.bufferToHex(new Buffer(data, 'utf8')) } -}
\ No newline at end of file +} diff --git a/app/scripts/lib/personal-message-manager.js b/app/scripts/lib/personal-message-manager.js index 72dd1da96..65ad9200a 100644 --- a/app/scripts/lib/personal-message-manager.js +++ b/app/scripts/lib/personal-message-manager.js @@ -33,6 +33,7 @@ module.exports = class MessageManager extends EventEmitter{ msgParams: msgParams, time: time, status: 'unapproved', + type: 'personal_sign', } this.addMsg(msgData) diff --git a/ui/app/components/pending-personal-msg.js b/ui/app/components/pending-personal-msg.js index b2cac164a..f4bde91dc 100644 --- a/ui/app/components/pending-personal-msg.js +++ b/ui/app/components/pending-personal-msg.js @@ -28,15 +28,6 @@ PendingMsg.prototype.render = function () { }, }, 'Sign Message'), - h('.error', { - style: { - margin: '10px', - }, - }, `Signing this message can have - dangerous side effects. Only sign messages from - sites you fully trust with your entire account. - This will be fixed in a future version.`), - // message details h(PendingTxDetails, state), diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js index 672ea54ae..571ae85b6 100644 --- a/ui/app/conf-tx.js +++ b/ui/app/conf-tx.js @@ -118,18 +118,25 @@ ConfirmTxScreen.prototype.render = function () { } function currentTxView (opts) { + log.info('rendering current tx view') const { txData } = opts - const { txParams, msgParams } = txData + const { txParams, msgParams, type } = txData - log.info('rendering current tx view') if (txParams) { - // This is a pending transaction log.debug('txParams detected, rendering pending tx') return h(PendingTx, opts) + } else if (msgParams) { - // This is a pending message to sign log.debug('msgParams detected, rendering pending msg') - return h(PendingMsg, opts) + + if (type === 'eth_sign') { + log.debug('rendering eth_sign message') + return h(PendingMsg, opts) + + } else if (type === 'personal_sign') { + log.debug('rendering personal_sign message') + return h(PendingPersonalMsg, opts) + } } } ConfirmTxScreen.prototype.checkBalanceAgainstTx = function (txData) { |