|
|
@ -27,13 +27,13 @@ function mapStateToProps (state) { |
|
|
|
requester: null, |
|
|
|
requester: null, |
|
|
|
requesterAddress: null, |
|
|
|
requesterAddress: null, |
|
|
|
accounts: accountsWithSendEtherInfoSelector(state), |
|
|
|
accounts: accountsWithSendEtherInfoSelector(state), |
|
|
|
conversionRate: conversionRateSelector(state) |
|
|
|
conversionRate: conversionRateSelector(state), |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function mapDispatchToProps (dispatch) { |
|
|
|
function mapDispatchToProps (dispatch) { |
|
|
|
return { |
|
|
|
return { |
|
|
|
goHome: () => dispatch(actions.goHome()) |
|
|
|
goHome: () => dispatch(actions.goHome()), |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -84,7 +84,7 @@ SignatureRequest.prototype.renderAccountDropdown = function () { |
|
|
|
dropdownOpen: accountDropdownOpen, |
|
|
|
dropdownOpen: accountDropdownOpen, |
|
|
|
openDropdown: () => this.setState({ accountDropdownOpen: true }), |
|
|
|
openDropdown: () => this.setState({ accountDropdownOpen: true }), |
|
|
|
closeDropdown: () => this.setState({ accountDropdownOpen: false }), |
|
|
|
closeDropdown: () => this.setState({ accountDropdownOpen: false }), |
|
|
|
}) |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
]) |
|
|
|
]) |
|
|
|
} |
|
|
|
} |
|
|
@ -128,7 +128,7 @@ SignatureRequest.prototype.renderRequestIcon = function () { |
|
|
|
h(Identicon, { |
|
|
|
h(Identicon, { |
|
|
|
diameter: 40, |
|
|
|
diameter: 40, |
|
|
|
address: requesterAddress, |
|
|
|
address: requesterAddress, |
|
|
|
}) |
|
|
|
}), |
|
|
|
]) |
|
|
|
]) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -137,7 +137,7 @@ SignatureRequest.prototype.renderRequestInfo = function () { |
|
|
|
|
|
|
|
|
|
|
|
h('div.request-signature__headline', [ |
|
|
|
h('div.request-signature__headline', [ |
|
|
|
`Your signature is being requested`, |
|
|
|
`Your signature is being requested`, |
|
|
|
]) |
|
|
|
]), |
|
|
|
|
|
|
|
|
|
|
|
]) |
|
|
|
]) |
|
|
|
} |
|
|
|
} |
|
|
@ -161,11 +161,9 @@ SignatureRequest.prototype.renderBody = function () { |
|
|
|
|
|
|
|
|
|
|
|
if (type === 'personal_sign') { |
|
|
|
if (type === 'personal_sign') { |
|
|
|
rows = [{ name: 'Message', value: this.msgHexToText(data) }] |
|
|
|
rows = [{ name: 'Message', value: this.msgHexToText(data) }] |
|
|
|
} |
|
|
|
} else if (type === 'eth_signTypedData') { |
|
|
|
else if (type === 'eth_signTypedData') { |
|
|
|
|
|
|
|
rows = data |
|
|
|
rows = data |
|
|
|
} |
|
|
|
} else if (type === 'eth_sign') { |
|
|
|
else if (type === 'eth_sign') { |
|
|
|
|
|
|
|
rows = [{ name: 'Message', value: data }] |
|
|
|
rows = [{ name: 'Message', value: data }] |
|
|
|
notice = `Signing this message can have
|
|
|
|
notice = `Signing this message can have
|
|
|
|
dangerous side effects. Only sign messages from |
|
|
|
dangerous side effects. Only sign messages from |
|
|
@ -183,7 +181,7 @@ SignatureRequest.prototype.renderBody = function () { |
|
|
|
className: classnames({ |
|
|
|
className: classnames({ |
|
|
|
'request-signature__notice': type === 'personal_sign' || type === 'eth_signTypedData', |
|
|
|
'request-signature__notice': type === 'personal_sign' || type === 'eth_signTypedData', |
|
|
|
'request-signature__warning': type === 'eth_sign', |
|
|
|
'request-signature__warning': type === 'eth_sign', |
|
|
|
}) |
|
|
|
}), |
|
|
|
}, [notice]), |
|
|
|
}, [notice]), |
|
|
|
|
|
|
|
|
|
|
|
h('div.request-signature__rows', [ |
|
|
|
h('div.request-signature__rows', [ |
|
|
@ -218,12 +216,10 @@ SignatureRequest.prototype.renderFooter = function () { |
|
|
|
if (type === 'personal_sign') { |
|
|
|
if (type === 'personal_sign') { |
|
|
|
cancel = cancelPersonalMessage |
|
|
|
cancel = cancelPersonalMessage |
|
|
|
sign = signPersonalMessage |
|
|
|
sign = signPersonalMessage |
|
|
|
} |
|
|
|
} else if (type === 'eth_signTypedData') { |
|
|
|
else if (type === 'eth_signTypedData') { |
|
|
|
|
|
|
|
cancel = cancelTypedMessage |
|
|
|
cancel = cancelTypedMessage |
|
|
|
sign = signTypedMessage |
|
|
|
sign = signTypedMessage |
|
|
|
} |
|
|
|
} else if (type === 'eth_sign') { |
|
|
|
else if (type === 'eth_sign') { |
|
|
|
|
|
|
|
cancel = cancelMessage |
|
|
|
cancel = cancelMessage |
|
|
|
sign = signMessage |
|
|
|
sign = signMessage |
|
|
|
} |
|
|
|
} |
|
|
|