aboutsummaryrefslogtreecommitdiffstats
path: root/ui
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
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')
-rw-r--r--ui/app/components/signature-request.js22
-rw-r--r--ui/app/conf-tx.js2
-rw-r--r--ui/app/css/itcss/components/request-signature.scss30
3 files changed, 29 insertions, 25 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', {
diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js
index fb5d2c0cf..97e0646e8 100644
--- a/ui/app/conf-tx.js
+++ b/ui/app/conf-tx.js
@@ -121,7 +121,7 @@ function currentTxView (opts) {
return h(PendingTx, opts)
} else if (msgParams) {
log.debug('msgParams detected, rendering pending msg')
-
+
return h(SignatureRequest, opts)
// if (type === 'eth_sign') {
diff --git a/ui/app/css/itcss/components/request-signature.scss b/ui/app/css/itcss/components/request-signature.scss
index 27882d83c..e9ba7dbfd 100644
--- a/ui/app/css/itcss/components/request-signature.scss
+++ b/ui/app/css/itcss/components/request-signature.scss
@@ -1,6 +1,5 @@
.request-signature {
&__container {
- height: 619px;
width: 380px;
border-radius: 8px;
background-color: $white;
@@ -11,6 +10,7 @@
align-items: center;
font-family: Roboto;
position: relative;
+ height: 100%;
@media screen and (max-width: $break-small) {
width: 100%;
@@ -68,7 +68,7 @@
display: flex;
justify-content: space-between;
margin-top: 18px;
- height: 69px;
+ margin-bottom: 20px;
}
&__account {
@@ -97,11 +97,14 @@
}
&__request-icon {
- align-self: flex-end;
+ margin-top: 25px;
}
&__body {
width: 100%;
+ height: 100%;
+ display: flex;
+ flex-flow: column;
}
&__request-info {
@@ -122,42 +125,33 @@
}
&__notice {
- height: 19px;
- width: 105px;
color: #9B9B9B;
font-family: "Avenir Next";
font-size: 14px;
line-height: 19px;
text-align: center;
- margin-top: 21px;
+ margin-top: 41px;
margin-bottom: 11px;
width: 100%;
}
&__rows {
- height: 262px;
+ height: 100%;
overflow-y: scroll;
overflow-x: hidden;
border-top: 1px solid $geyser;
-
- @media screen and (max-width: $break-small) {
- height: 208px;
- }
+ display: flex;
+ flex-flow: column;
+ padding-right: 4px;
}
- // &__rows::-webkit-scrollbar {
- // display: none;
- // }
-
&__row {
- height: 74px;
display: flex;
flex-flow: column;
border-bottom: 1px solid $geyser;
}
&__row-title {
- height: 22px;
width: 80px;
color: $dusty-gray;
font-family: Roboto;
@@ -169,7 +163,6 @@
}
&__row-value {
- height: 19px;
color: $scorpion;
font-family: Roboto;
font-size: 14px;
@@ -178,6 +171,7 @@
margin-bottom: 15px;
margin-left: 18px;
width: 95%;
+ overflow-wrap: break-word;
}
&__footer {