Skip to content

fix: only ever select a Ready-named wallet in resolvePrivacyWallet - #23

Open
sainathr19 wants to merge 1 commit into
azeemshaik025:mainfrom
sainathr19:fix/wallet-discovery-metamask-fallback
Open

fix: only ever select a Ready-named wallet in resolvePrivacyWallet#23
sainathr19 wants to merge 1 commit into
azeemshaik025:mainfrom
sainathr19:fix/wallet-discovery-metamask-fallback

Conversation

@sainathr19

Copy link
Copy Markdown
Collaborator

Summary

  • resolvePrivacyWallet fell back to wallets[0] when no Ready-named wallet was found. get-starknet-discovery surfaces every wallet-standard-compatible extension, not just Starknet-native ones — on a profile with MetaMask's Starknet snap installed, that fallback picked up MetaMask and repeatedly called requestAccounts/supportedWalletApi against it, each rejected with no useful signal, on a loop, for as long as the page stayed open.
  • Now requires a Ready-named match or returns null.

Found while debugging the live mainnet UI: console was spamming MetaMask - RPC Error: Unauthorized to perform action continuously.

Test plan

  • npm run build succeeds
  • Verified in browser: MetaMask snap console spam gone after the fix + page reload, wallet detection still resolves the Ready wallet correctly

get-starknet-discovery finds every wallet-standard-compatible extension
on the page, not just Starknet-native ones — on a profile with MetaMask's
Starknet snap installed, the previous wallets[0] fallback picked it up
and repeatedly called requestAccounts/supportedWalletApi against it,
each call rejected with no useful signal, for as long as the page stayed
open. Require a Ready-named match or return null instead of guessing.
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