From d7f80c13c68288aee4a104c8dcccf7d46d0015d1 Mon Sep 17 00:00:00 2001 From: highlander Date: Thu, 30 Apr 2026 21:44:44 -0500 Subject: [PATCH] fix(masking): default MetaMask masking ON; readable contrast on Settings text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two pain points reported on the side-panel Settings screen. 1) MetaMask masking now defaults to ON. CowSwap and several aggregators expect a window.ethereum with isMetaMask:true and bail out of their connect flow without it. Modern dApps that discover wallets via EIP-6963 still see KeepKey as itself, so this is purely additive coverage. Existing installs keep whatever they previously set; only fresh installs (or storage resets) pick up the new default. 2) The two body-text labels under "Enable Masking" used color="gray.500" which is unreadable on the side panel's dark background — black-on-black for the part the user most needs to see (the conflict warning). Switched to whiteAlpha.700, the codebase convention for secondary copy on dark surfaces (Connect.tsx, Balances.tsx, Tokens.tsx, CustomTokenDialog.tsx all use it). Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/storage/lib/customStorage.ts | 7 ++++++- pages/side-panel/src/components/Settings.tsx | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/storage/lib/customStorage.ts b/packages/storage/lib/customStorage.ts index 2dfa9ec..8d87671 100644 --- a/packages/storage/lib/customStorage.ts +++ b/packages/storage/lib/customStorage.ts @@ -363,7 +363,12 @@ const createMaskingSettingsStorage = (): MaskingSettingsStorage => { const storage = createStorage( 'masking-settings', { - enableMetaMaskMasking: false, + // Default ON — modern dApps (CowSwap, swap aggregators, several + // older sites) expect a window.ethereum with isMetaMask:true and + // bail out of their connect flow without it. Modern dApps that + // discover wallets via EIP-6963 still see KeepKey as itself. + // Existing installs keep whatever they previously set. + enableMetaMaskMasking: true, enableXfiMasking: false, enableKeplrMasking: false, }, diff --git a/pages/side-panel/src/components/Settings.tsx b/pages/side-panel/src/components/Settings.tsx index 374543b..a04ccf2 100644 --- a/pages/side-panel/src/components/Settings.tsx +++ b/pages/side-panel/src/components/Settings.tsx @@ -198,7 +198,7 @@ const Settings = () => { - + When on, KeepKey claims to be MetaMask on legacy dApps (Stripe, older sites) by mounting window.ethereum with isMetaMask: true. Modern dApps still see KeepKey via EIP-6963. Refresh any open dApp after @@ -269,7 +269,7 @@ const Settings = () => { )} - + This setting may conflict with these apps if also enabled.