Skip to content

Commit

Permalink
Merge branch 'main' into fix/siwe-get-session-missing-params
Browse files Browse the repository at this point in the history
  • Loading branch information
tomiir authored Nov 27, 2024
2 parents d634beb + f270e13 commit 463f411
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .changeset/long-bags-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@reown/appkit-adapter-polkadot': patch
'@reown/appkit-adapter-ethers5': patch
'@reown/appkit-adapter-ethers': patch
'@reown/appkit-adapter-solana': patch
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit-utils': patch
'@reown/appkit-experimental': patch
'@reown/appkit-scaffold-ui': patch
'@reown/appkit-polyfills': patch
'@reown/appkit': patch
'@reown/appkit-common': patch
'@reown/appkit-wallet': patch
'@reown/appkit-core': patch
'@reown/appkit-siwe': patch
'@reown/appkit-siwx': patch
'@apps/gallery': patch
'@reown/appkit-cdn': patch
'@reown/appkit-ui': patch
'@apps/demo': patch
---

Fix issue where it is not possible to switch network with MM mobile wallet
8 changes: 7 additions & 1 deletion packages/appkit/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,13 @@ export class AppKit {
const namespaces = this.universalProvider?.session?.namespaces

return {
supportsAllNetworks: false,
/*
* MetaMask Wallet only returns 1 namespace in the session object. This makes it imposible
* to switch to other networks. Setting supportsAllNetworks to true for MetaMask Wallet
* will make it possible to switch to other networks.
*/
supportsAllNetworks:
this.universalProvider?.session?.peer?.metadata.name === 'MetaMask Wallet',
approvedCaipNetworkIds: this.getChainsFromNamespaces(namespaces)
}
}
Expand Down

0 comments on commit 463f411

Please sign in to comment.