diff --git a/app/scripts/lib/personal-message-manager.js b/app/scripts/lib/personal-message-manager.js index 8440fa4ce0ac..bb0a2b0c1e04 100644 --- a/app/scripts/lib/personal-message-manager.js +++ b/app/scripts/lib/personal-message-manager.js @@ -153,15 +153,6 @@ export default class PersonalMessageManager extends EventEmitter { const siwe = detectSIWE(msgParams); msgParams.siwe = siwe; - if (siwe.isSIWEMessage && req.origin) { - const { host } = new URL(req.origin); - if (siwe.parsedMessage.domain !== host) { - throw new Error( - `SIWE domain is not valid: "${host}" !== "${siwe.parsedMessage.domain}"`, - ); - } - } - // create txData obj with parameters and meta data const time = new Date().getTime(); const msgId = createId(); diff --git a/app/scripts/lib/personal-message-manager.test.js b/app/scripts/lib/personal-message-manager.test.js index a4f8f4613f6d..e565c0229b69 100644 --- a/app/scripts/lib/personal-message-manager.test.js +++ b/app/scripts/lib/personal-message-manager.test.js @@ -178,15 +178,5 @@ describe('Personal Message Manager', () => { const result2 = messageManager.getMsg(msgId2); expect(result2.msgParams.siwe.isSIWEMessage).toStrictEqual(false); }); - - it("should throw an error if the SIWE message's domain doesn't match", async () => { - const request = { origin: 'https://mismatched-domain.com' }; - const { host: siweDomain } = new URL(origin); - const { host: browserDomain } = new URL(request.origin); - const expectedError = `SIWE domain is not valid: "${browserDomain}" !== "${siweDomain}"`; - await expect(async () => { - await messageManager.addUnapprovedMessage(msgParams, request); - }).rejects.toThrow(expectedError); - }); }); }); diff --git a/ui/components/app/signature-request-siwe/index.scss b/ui/components/app/signature-request-siwe/index.scss index a6de5df10bdf..2dedc438ace4 100644 --- a/ui/components/app/signature-request-siwe/index.scss +++ b/ui/components/app/signature-request-siwe/index.scss @@ -21,18 +21,25 @@ box-shadow: 0 0 7px 0 rgba(0, 0, 0, 0.08); } + /** @todo replace ActionableMessage or remove overwritten code. */ .signature-request-siwe__actionable-message { - margin: 0 16px 16px; + margin: 0 16px; + flex-direction: row; + align-items: initial; .icon { position: absolute; left: 17px; top: 13px; } - } - .actionable-message--with-icon.actionable-message--with-right-button { - padding-left: 48px; + .actionable-message__message { + padding-left: 16px; + } + + &.actionable-message--with-icon { + padding-left: 16px; + } } } diff --git a/ui/components/app/signature-request-siwe/signature-request-siwe.js b/ui/components/app/signature-request-siwe/signature-request-siwe.js index 9aae8922899e..4ae5533eb887 100644 --- a/ui/components/app/signature-request-siwe/signature-request-siwe.js +++ b/ui/components/app/signature-request-siwe/signature-request-siwe.js @@ -131,7 +131,6 @@ export default function SignatureRequestSIWE({ } iconFillColor="var(--color-error-default)" useIcon - withRightButton icon={} /> )}