diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index ea827a261..e9c9b78c3 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -3294,6 +3294,9 @@ "signatureRequest1": { "message": "Message" }, + "signatureRequestGuidance": { + "message": "Only sign this message if you fully understand the content and trust the requesting site." + }, "signatureRequestWarning": { "message": "Signing this message could be dangerous. You may be giving total control of your account and assets to the party on the other end of this message. That means they could drain your account at any time. Proceed with caution. $1." }, diff --git a/ui/components/app/signature-request-original/__snapshots__/signature-request-original.test.js.snap b/ui/components/app/signature-request-original/__snapshots__/signature-request-original.test.js.snap index 6bf931eb6..38b691b7d 100644 --- a/ui/components/app/signature-request-original/__snapshots__/signature-request-original.test.js.snap +++ b/ui/components/app/signature-request-original/__snapshots__/signature-request-original.test.js.snap @@ -140,6 +140,11 @@ exports[`SignatureRequestOriginal should match snapshot 1`] = ` > Signature request +
+ Only sign this message if you fully understand the content and trust the requesting site. +
diff --git a/ui/components/app/signature-request-original/index.scss b/ui/components/app/signature-request-original/index.scss index 26ee4c81a..d44b72f71 100644 --- a/ui/components/app/signature-request-original/index.scss +++ b/ui/components/app/signature-request-original/index.scss @@ -10,6 +10,8 @@ align-items: center; position: relative; height: 100%; + margin-left: auto; + margin-right: auto; @include screen-sm-max { width: 100%; @@ -78,7 +80,7 @@ @include H6; text-align: center; - margin-top: 41px; + margin-top: 21px; margin-bottom: 11px; width: 100%; } diff --git a/ui/components/app/signature-request-original/signature-request-original.component.js b/ui/components/app/signature-request-original/signature-request-original.component.js index e02b29b81..b2f4813f8 100644 --- a/ui/components/app/signature-request-original/signature-request-original.component.js +++ b/ui/components/app/signature-request-original/signature-request-original.component.js @@ -16,6 +16,8 @@ import Typography from '../../ui/typography/typography'; import { TYPOGRAPHY, FONT_WEIGHT, + COLORS, + TEXT_ALIGN, } from '../../../helpers/constants/design-system'; import { NETWORK_TYPES } from '../../../../shared/constants/network'; import SignatureRequestOriginalWarning from './signature-request-original-warning'; @@ -153,6 +155,16 @@ export default class SignatureRequestOriginal extends Component { > {this.context.t('sigRequest')} + + {this.context.t('signatureRequestGuidance')} +
{notice}
@@ -303,13 +315,16 @@ export default class SignatureRequestOriginal extends Component { render = () => { const { messagesCount, conversionRate, nativeCurrency } = this.props; - const { fromAccount, showSignatureRequestWarning } = this.state; + const { + fromAccount: { address, balance, name }, + showSignatureRequestWarning, + } = this.state; const { t } = this.context; const rejectNText = t('rejectRequestsN', [messagesCount]); const currentNetwork = this.getNetworkName(); - const balanceInBaseAsset = conversionUtil(fromAccount.balance, { + const balanceInBaseAsset = conversionUtil(balance, { fromNumericBase: 'hex', toNumericBase: 'dec', fromDenomination: 'WEI', @@ -322,10 +337,10 @@ export default class SignatureRequestOriginal extends Component {
{this.renderBody()} @@ -336,8 +351,8 @@ export default class SignatureRequestOriginal extends Component { ) : null} {showSignatureRequestWarning && ( await this.onSubmit(event)} onCancel={async (event) => await this.onCancel(event)} /> diff --git a/ui/components/app/signature-request-original/signature-request-original.stories.js b/ui/components/app/signature-request-original/signature-request-original.stories.js index bc2c73900..6e52df8ef 100644 --- a/ui/components/app/signature-request-original/signature-request-original.stories.js +++ b/ui/components/app/signature-request-original/signature-request-original.stories.js @@ -71,6 +71,7 @@ export default { }, mostRecentOverviewPage: '/', nativeCurrency: 'ETH', + provider: { name: 'Goerli ETH' }, }, }; diff --git a/ui/components/app/signature-request/index.scss b/ui/components/app/signature-request/index.scss index 0e5c891a7..28a2eb16c 100644 --- a/ui/components/app/signature-request/index.scss +++ b/ui/components/app/signature-request/index.scss @@ -8,9 +8,17 @@ flex: 1 1 auto; flex-direction: column; min-width: 0; + width: 408px; + background-color: var(--color-background-default); + box-shadow: var(--shadow-size-xs) var(--color-shadow-default); + border-radius: 8px; @include screen-sm-min { - flex: initial; + max-height: 55vh; + min-height: 570px; + flex: 0 0 auto; + margin-left: auto; + margin-right: auto; } } @@ -29,7 +37,6 @@ display: flex; align-items: center; flex-direction: column; - margin-bottom: 25px; min-height: min-content; &__title { diff --git a/ui/components/app/signature-request/signature-request.component.js b/ui/components/app/signature-request/signature-request.component.js index 18c3f487e..fde4acd51 100644 --- a/ui/components/app/signature-request/signature-request.component.js +++ b/ui/components/app/signature-request/signature-request.component.js @@ -12,6 +12,7 @@ import { TYPOGRAPHY, FONT_WEIGHT, COLORS, + TEXT_ALIGN, } from '../../../helpers/constants/design-system'; import NetworkAccountBalanceHeader from '../network-account-balance-header'; import { NETWORK_TYPES } from '../../../../shared/constants/network'; @@ -174,7 +175,7 @@ export default class SignatureRequest extends PureComponent { : null; return ( -
+
{this.context.t('sigRequest')} - + + {this.context.t('signatureRequestGuidance')} +