aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/signature-request.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-10-26 08:28:56 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-10-26 08:40:48 +0800
commitddf11011c9467209e6b9810dff2df84ea9e4a040 (patch)
treed286b54c776c132534e520ad177f278c617931b3 /ui/app/components/signature-request.js
parent39d4fe311f694a659d1d1454159417719d552b9d (diff)
downloadtangerine-wallet-browser-ddf11011c9467209e6b9810dff2df84ea9e4a040.tar
tangerine-wallet-browser-ddf11011c9467209e6b9810dff2df84ea9e4a040.tar.gz
tangerine-wallet-browser-ddf11011c9467209e6b9810dff2df84ea9e4a040.tar.bz2
tangerine-wallet-browser-ddf11011c9467209e6b9810dff2df84ea9e4a040.tar.lz
tangerine-wallet-browser-ddf11011c9467209e6b9810dff2df84ea9e4a040.tar.xz
tangerine-wallet-browser-ddf11011c9467209e6b9810dff2df84ea9e4a040.tar.zst
tangerine-wallet-browser-ddf11011c9467209e6b9810dff2df84ea9e4a040.zip
Signature request fixes.
Diffstat (limited to 'ui/app/components/signature-request.js')
-rw-r--r--ui/app/components/signature-request.js22
1 files changed, 16 insertions, 6 deletions
diff --git a/ui/app/components/signature-request.js b/ui/app/components/signature-request.js
index 4df4f9193..35a739a8f 100644
--- a/ui/app/components/signature-request.js
+++ b/ui/app/components/signature-request.js
@@ -156,20 +156,24 @@ SignatureRequest.prototype.msgHexToText = function (hex) {
SignatureRequest.prototype.renderBody = function () {
let rows
+ let notice = 'You are signing:'
const { txData } = this.props
const { type, msgParams: { data } } = txData
if (type === 'personal_sign') {
- rows = [{ name: 'Message:', value: this.msgHexToText(data) }]
+ rows = [{ name: 'Message', value: this.msgHexToText(data) }]
}
else if (type === 'eth_signTypedData') {
rows = data
}
- // given the warning in './pending-msg.js', eth_sign' has not been implemented on NewUI-flat at this time
- // else if (type === 'eth_sign') {
- // console.log('Not currently supported')
- // }
+ else if (type === 'eth_sign') {
+ rows = [{ name: 'Message', value: data }]
+ notice = `Signing this message can have
+ dangerous side effects. Only sign messages from
+ sites you fully trust with your entire account.
+ This dangerous method will be removed in a future version. `
+ }
return h('div.request-signature__body', {}, [
@@ -177,7 +181,7 @@ SignatureRequest.prototype.renderBody = function () {
this.renderRequestInfo(),
- h('div.request-signature__notice', ['You are signing:']),
+ h('div.request-signature__notice', [notice]),
h('div.request-signature__rows', [
@@ -200,6 +204,8 @@ SignatureRequest.prototype.renderFooter = function () {
signTypedMessage,
cancelPersonalMessage,
cancelTypedMessage,
+ signMessage,
+ cancelMessage,
} = this.props
const { txData } = this.props
@@ -215,6 +221,10 @@ SignatureRequest.prototype.renderFooter = function () {
cancel = cancelTypedMessage
sign = signTypedMessage
}
+ else if (type === 'eth_sign') {
+ cancel = cancelMessage
+ sign = signMessage
+ }
return h('div.request-signature__footer', [
h('div.request-signature__footer__cancel-button', {