Skip to content

chore: remove Mask Wallet - #12433

Merged
guanbinrui merged 5 commits into
developfrom
chore/remove-mask-wallet
Sep 5, 2026
Merged

chore: remove Mask Wallet#12433
guanbinrui merged 5 commits into
developfrom
chore/remove-mask-wallet

Conversation

@guanbinrui

Copy link
Copy Markdown
Member

Summary

  • Removes the built-in Mask-native wallet (mnemonic/private-key management, keystore, payment password, lock/unlock, HD derivation, and all related create/import/export UI) while keeping external wallet connections (MetaMask, WalletConnect, etc.) and all other Web3 plugin features untouched.
  • Firefly/Privy embedded wallets (created via X/Twitter login) are re-architected onto their own ProviderType.Firefly, backed entirely by the already-independent Firefly REST API — no more piggy-backing on Mask Wallet's local-key storage/provider. Existing Firefly users lose no data (the wallet list was always fetched fresh from Firefly's backend; only an internal account-pointer cache is rebuilt on first load).
  • The dApp-facing injected wallet identity is removed entirely: packages/mask-sdk and packages/mask/entry-sdk (EIP-6963 announceProvider self-registration + the RPC bridge hardcoded to the built-in wallet, including its own per-origin permission-grant model) are deleted wholesale — confirmed dead/dev-only-flagged beyond that one purpose. Web pages no longer see "Mask Wallet" as a selectable provider.
  • Background wallet services (mnemonic/keystore crypto via @dimensiondev/mask-wallet-core, password vault, lock timer, legacy wallet migration, per-origin permission grants) are deleted. The silent-transaction-signing path (services/wallet/services/send.ts) is rewritten to sign via the Firefly REST client instead.
  • Backup/restore: wallet-secret backup/restore becomes a no-op; backup-format wire types are left untouched so old backup files still parse (wallet data is just silently skipped on restore).
  • Popup/dashboard UI: wallet creation/import/derive/lock/settings screens are deleted; the Wallet tab gate (WalletGuard) is rewritten to be provider-agnostic, showing a "connect a wallet" empty state instead of mnemonic onboarding when nothing is connected; several dead-code clusters that depended on the removed entry-sdk permission model (Connected Sites, a legacy full-page Gas Setting flow) were also cleaned up.
  • Cleanup: dead PopupRoutes/DashboardRoutes members, the MaskWallet provider descriptor/icon, the @dimensiondev/mask-wallet-core dependency (3 package.json files), and orphaned locale strings are removed.

Test plan

  • tsc -b --force clean across the whole monorepo (20 remaining errors are pre-existing/unrelated — a GasSettingModal/ChooseTokenModal generic-parameter-order bug present on develop before this change, in files this PR never touches).
  • eslint clean on all touched files.
  • Repo-wide grep sweep for every deleted symbol/route/service (ProviderType.MaskWallet, MaskWalletProvider, mask-wallet-core, entry-sdk, @masknet/sdk, PluginID.Wallet, deleted Services.Wallet.* methods) returns zero hits.
  • Full production extension build (pnpm run build) succeeds; verified the built build/ output contains zero references to the deleted mask-sdk/entry-sdk.
  • Manual browser QA (not done in this PR — needs a human with a loaded unpacked extension): connect an external wallet and confirm the popup Wallet tab shows its balance/assets; confirm a test dApp's wallet picker no longer offers "Mask Wallet"; confirm Firefly wallet login/creation and signing (e.g. a RedPacket claim) still work end-to-end; confirm importing an old backup file doesn't crash and silently skips wallet data.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ly4aKgVW1wnPu2LfzTQuJi

guanbinrui and others added 5 commits September 5, 2026 19:31
Removes the built-in Mask-native wallet (mnemonic/private-key management,
keystore, payment password, lock/unlock, HD derivation, and all related
create/import/export UI) while keeping external wallet connections
(MetaMask, WalletConnect, etc.) and all other Web3 features intact.

- Firefly/Privy embedded wallets are re-architected onto their own
  ProviderType.Firefly, backed by the already-independent Firefly REST
  API, instead of piggy-backing on Mask Wallet's local-key storage.
- The dApp-facing injected wallet identity (EIP-6963 announcement and the
  entry-sdk/mask-sdk RPC bridge, both hardcoded to the built-in wallet)
  is removed entirely; web pages no longer see "Mask Wallet" as a
  selectable provider.
- Background wallet services (mnemonic/keystore crypto, password vault,
  lock timer, legacy wallet migration, per-origin permission grants) are
  deleted; wallet-related backup/restore paths become no-ops while
  preserving backward-compatible parsing of old backup files.
- Popup/dashboard UI: wallet creation/import/derive/lock/settings screens
  are removed; the Wallet tab gate is rewritten to be provider-agnostic
  (shows a "connect a wallet" empty state instead of mnemonic onboarding
  when nothing is connected).
- Cleanup: dead routes, the MaskWallet provider descriptor/icon, the
  @dimensiondev/mask-wallet-core dependency, and orphaned locale strings
  are removed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ly4aKgVW1wnPu2LfzTQuJi
Running \`tsc -b\` for verification during the Mask Wallet removal
incidentally emitted .d.ts/.d.ts.map declaration files in-place under
packages/scripts/src and packages/mask/.webpack, which got swept up by
git add. These are build output, not source, and don't exist on
develop. Also fixes a lingering type-only-import lint warning in
popup-opener.ts.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ly4aKgVW1wnPu2LfzTQuJi
…hooseTokenModal

Introduced by the wallet-removal cleanup of this file: SingletonModal's
generic order is <OpenProps, CloseProps> everywhere else, but these two
got swapped to <CloseProps, OpenProps> while removing the adjacent
deleted-wallet-modal declarations. Fixes the type-check CI failure.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ly4aKgVW1wnPu2LfzTQuJi
…oval

- PluginID.SmartPay and its SmartPayDialogEvent had zero remaining
  callers already (the SmartPay account-abstraction plugin was removed
  before this change); leaves the SmartPay ABI/transaction-history
  strings intact for decoding old transactions.
- PluginID.Wallet, PluginID.WalletService, and WalletSettingsDialogEvent
  became dead as a direct result of this PR's own deletions (the wallet
  database and WalletSettings UI) and were missed in the original pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ly4aKgVW1wnPu2LfzTQuJi
@guanbinrui
guanbinrui merged commit ac5c7c6 into develop Sep 5, 2026
11 checks passed
@guanbinrui
guanbinrui deleted the chore/remove-mask-wallet branch September 5, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant