aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/signature-request.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/signature-request.js')
-rw-r--r--ui/app/components/signature-request.js33
1 files changed, 12 insertions, 21 deletions
diff --git a/ui/app/components/signature-request.js b/ui/app/components/signature-request.js
index e617fdbd6..c5cc23aa8 100644
--- a/ui/app/components/signature-request.js
+++ b/ui/app/components/signature-request.js
@@ -6,9 +6,7 @@ const connect = require('react-redux').connect
const ethUtil = require('ethereumjs-util')
const classnames = require('classnames')
-const PendingTxDetails = require('./pending-personal-msg-details')
const AccountDropdownMini = require('./dropdowns/account-dropdown-mini')
-const BinaryRenderer = require('./binary-renderer')
const actions = require('../actions')
const { conversionUtil } = require('../conversion-util')
@@ -29,13 +27,13 @@ function mapStateToProps (state) {
requester: null,
requesterAddress: null,
accounts: accountsWithSendEtherInfoSelector(state),
- conversionRate: conversionRateSelector(state)
+ conversionRate: conversionRateSelector(state),
}
}
function mapDispatchToProps (dispatch) {
return {
- goHome: () => dispatch(actions.goHome())
+ goHome: () => dispatch(actions.goHome()),
}
}
@@ -86,7 +84,7 @@ SignatureRequest.prototype.renderAccountDropdown = function () {
dropdownOpen: accountDropdownOpen,
openDropdown: () => this.setState({ accountDropdownOpen: true }),
closeDropdown: () => this.setState({ accountDropdownOpen: false }),
- })
+ }),
])
}
@@ -115,7 +113,7 @@ SignatureRequest.prototype.renderAccountInfo = function () {
return h('div.request-signature__account-info', [
this.renderAccountDropdown(),
-
+
this.renderRequestIcon(),
this.renderBalance(),
@@ -130,18 +128,16 @@ SignatureRequest.prototype.renderRequestIcon = function () {
h(Identicon, {
diameter: 40,
address: requesterAddress,
- })
+ }),
])
}
SignatureRequest.prototype.renderRequestInfo = function () {
- const { requester } = this.props
-
return h('div.request-signature__request-info', [
h('div.request-signature__headline', [
`Your signature is being requested`,
- ])
+ ]),
])
}
@@ -165,11 +161,9 @@ SignatureRequest.prototype.renderBody = function () {
if (type === 'personal_sign') {
rows = [{ name: 'Message', value: this.msgHexToText(data) }]
- }
- else if (type === 'eth_signTypedData') {
+ } else if (type === 'eth_signTypedData') {
rows = data
- }
- else if (type === 'eth_sign') {
+ } else if (type === 'eth_sign') {
rows = [{ name: 'Message', value: data }]
notice = `Signing this message can have
dangerous side effects. Only sign messages from
@@ -187,14 +181,14 @@ SignatureRequest.prototype.renderBody = function () {
className: classnames({
'request-signature__notice': type === 'personal_sign' || type === 'eth_signTypedData',
'request-signature__warning': type === 'eth_sign',
- })
+ }),
}, [notice]),
h('div.request-signature__rows', [
...rows.map(({ name, value }) => {
return h('div.request-signature__row', [
- h('div.request-signature__row-title', [`${name}:`]),
+ h('div.request-signature__row-title', [`${name}:`]),
h('div.request-signature__row-value', value),
])
}),
@@ -206,7 +200,6 @@ SignatureRequest.prototype.renderBody = function () {
SignatureRequest.prototype.renderFooter = function () {
const {
- goHome,
signPersonalMessage,
signTypedMessage,
cancelPersonalMessage,
@@ -223,12 +216,10 @@ SignatureRequest.prototype.renderFooter = function () {
if (type === 'personal_sign') {
cancel = cancelPersonalMessage
sign = signPersonalMessage
- }
- else if (type === 'eth_signTypedData') {
+ } else if (type === 'eth_signTypedData') {
cancel = cancelTypedMessage
sign = signTypedMessage
- }
- else if (type === 'eth_sign') {
+ } else if (type === 'eth_sign') {
cancel = cancelMessage
sign = signMessage
}