From 7aad1c9650ec0369faefeb381db08f1ef73c63da Mon Sep 17 00:00:00 2001 From: Sam Gbafa Date: Thu, 9 Feb 2023 11:05:16 -0800 Subject: [PATCH] remove siwe feature flag (#17690) Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com> --- .metamaskrc.dist | 3 --- app/scripts/lib/createRPCMethodTrackingMiddleware.js | 4 ++-- development/build/config.js | 1 - development/build/scripts.js | 1 - ui/pages/confirm-signature-request/index.js | 2 +- 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.metamaskrc.dist b/.metamaskrc.dist index 3b105df3c..6bcb5db52 100644 --- a/.metamaskrc.dist +++ b/.metamaskrc.dist @@ -9,8 +9,5 @@ PUBNUB_SUB_KEY= PORTFOLIO_URL= TRANSACTION_SECURITY_PROVIDER= -; Set this to '1' to enable support for Sign-In with Ethereum [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) -SIWE_V1= - ; Set this to test changes to the phishing warning page. PHISHING_WARNING_PAGE_URL= diff --git a/app/scripts/lib/createRPCMethodTrackingMiddleware.js b/app/scripts/lib/createRPCMethodTrackingMiddleware.js index b1d4ffeae..9073a26c3 100644 --- a/app/scripts/lib/createRPCMethodTrackingMiddleware.js +++ b/app/scripts/lib/createRPCMethodTrackingMiddleware.js @@ -166,7 +166,7 @@ export default function createRPCMethodTrackingMiddleware({ properties.method = method; } - if (process.env.SIWE_V1 && method === MESSAGE_TYPE.PERSONAL_SIGN) { + if (method === MESSAGE_TYPE.PERSONAL_SIGN) { const data = req?.params?.[0]; const { isSIWEMessage } = detectSIWE({ data }); if (isSIWEMessage) { @@ -208,7 +208,7 @@ export default function createRPCMethodTrackingMiddleware({ properties.method = method; } - if (process.env.SIWE_V1 && method === MESSAGE_TYPE.PERSONAL_SIGN) { + if (method === MESSAGE_TYPE.PERSONAL_SIGN) { const data = req?.params?.[0]; const { isSIWEMessage } = detectSIWE({ data }); if (isSIWEMessage) { diff --git a/development/build/config.js b/development/build/config.js index fc881bf38..fb485c5a1 100644 --- a/development/build/config.js +++ b/development/build/config.js @@ -14,7 +14,6 @@ const configurationPropertyNames = [ 'SEGMENT_HOST', 'SEGMENT_WRITE_KEY', 'SENTRY_DSN_DEV', - 'SIWE_V1', 'SWAPS_USE_DEV_APIS', ]; diff --git a/development/build/scripts.js b/development/build/scripts.js index 1f764b735..589344a11 100644 --- a/development/build/scripts.js +++ b/development/build/scripts.js @@ -1123,7 +1123,6 @@ async function getEnvironmentVariables({ buildTarget, buildType, version }) { SEGMENT_WRITE_KEY: getSegmentWriteKey({ buildType, config, environment }), SENTRY_DSN: config.SENTRY_DSN, SENTRY_DSN_DEV: config.SENTRY_DSN_DEV, - SIWE_V1: config.SIWE_V1 === '1', SWAPS_USE_DEV_APIS: config.SWAPS_USE_DEV_APIS === '1', TOKEN_ALLOWANCE_IMPROVEMENTS: config.TOKEN_ALLOWANCE_IMPROVEMENTS === '1', TRANSACTION_SECURITY_PROVIDER: config.TRANSACTION_SECURITY_PROVIDER === '1', diff --git a/ui/pages/confirm-signature-request/index.js b/ui/pages/confirm-signature-request/index.js index 638d20269..1dd1cba87 100644 --- a/ui/pages/confirm-signature-request/index.js +++ b/ui/pages/confirm-signature-request/index.js @@ -35,7 +35,7 @@ const signatureSelect = (txData) => { return SignatureRequest; } - if (process.env.SIWE_V1 && siwe?.isSIWEMessage) { + if (siwe?.isSIWEMessage) { return SignatureRequestSIWE; }