mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Signature request fixes.
This commit is contained in:
parent
39d4fe311f
commit
ddf11011c9
@ -1,5 +1,5 @@
|
||||
const extension = require('extensionizer')
|
||||
const height = 520
|
||||
const height = 610
|
||||
const width = 360
|
||||
|
||||
|
||||
|
@ -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', {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user