Add alternate UI for pending personal_sign messages

feature/default_network_editable
Dan Finlay 8 years ago
parent 564f920ae0
commit 7ec25526b7
  1. 1
      app/scripts/lib/message-manager.js
  2. 1
      app/scripts/lib/personal-message-manager.js
  3. 9
      ui/app/components/pending-personal-msg.js
  4. 15
      ui/app/conf-tx.js

@ -33,6 +33,7 @@ module.exports = class MessageManager extends EventEmitter{
msgParams: msgParams, msgParams: msgParams,
time: time, time: time,
status: 'unapproved', status: 'unapproved',
type: 'eth_sign',
} }
this.addMsg(msgData) this.addMsg(msgData)

@ -33,6 +33,7 @@ module.exports = class MessageManager extends EventEmitter{
msgParams: msgParams, msgParams: msgParams,
time: time, time: time,
status: 'unapproved', status: 'unapproved',
type: 'personal_sign',
} }
this.addMsg(msgData) this.addMsg(msgData)

@ -28,15 +28,6 @@ PendingMsg.prototype.render = function () {
}, },
}, 'Sign Message'), }, '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 // message details
h(PendingTxDetails, state), h(PendingTxDetails, state),

@ -118,18 +118,25 @@ ConfirmTxScreen.prototype.render = function () {
} }
function currentTxView (opts) { function currentTxView (opts) {
log.info('rendering current tx view')
const { txData } = opts const { txData } = opts
const { txParams, msgParams } = txData const { txParams, msgParams, type } = txData
log.info('rendering current tx view')
if (txParams) { if (txParams) {
// This is a pending transaction
log.debug('txParams detected, rendering pending tx') log.debug('txParams detected, rendering pending tx')
return h(PendingTx, opts) return h(PendingTx, opts)
} else if (msgParams) { } else if (msgParams) {
// This is a pending message to sign
log.debug('msgParams detected, rendering pending msg') log.debug('msgParams detected, rendering pending msg')
if (type === 'eth_sign') {
log.debug('rendering eth_sign message')
return h(PendingMsg, opts) return h(PendingMsg, opts)
} else if (type === 'personal_sign') {
log.debug('rendering personal_sign message')
return h(PendingPersonalMsg, opts)
}
} }
} }
ConfirmTxScreen.prototype.checkBalanceAgainstTx = function (txData) { ConfirmTxScreen.prototype.checkBalanceAgainstTx = function (txData) {

Loading…
Cancel
Save