diff --git a/apps/laboratory/src/pages/library/solana.tsx b/apps/laboratory/src/pages/library/solana.tsx index a932d9b084..137fc71bff 100644 --- a/apps/laboratory/src/pages/library/solana.tsx +++ b/apps/laboratory/src/pages/library/solana.tsx @@ -19,7 +19,6 @@ const modal = createWeb3Modal({ solanaConfig, projectId: ConstantsUtil.ProjectId, metadata: ConstantsUtil.Metadata, - defaultChain: solana, chains, enableAnalytics: false, termsConditionsUrl: 'https://walletconnect.com/terms', diff --git a/packages/base/adapters/solana/web3js/client.ts b/packages/base/adapters/solana/web3js/client.ts index 6295307d30..0d96026f5e 100644 --- a/packages/base/adapters/solana/web3js/client.ts +++ b/packages/base/adapters/solana/web3js/client.ts @@ -87,9 +87,7 @@ export class SolanaWeb3JsClient implements ChainAdapter c.chainId === defaultChain?.chainId) + this.defaultChain = SolHelpersUtil.getChainFromCaip( + this.chains, + SafeLocalStorage.getItem(SolConstantsUtil.CAIP_CHAIN_ID) || + withSolanaNamespace(defaultChain?.chainId) || + withSolanaNamespace(chains[0]?.chainId) + ) this.networkControllerClient = { switchCaipNetwork: async caipNetwork => { @@ -291,13 +288,13 @@ export class SolanaWeb3JsClient implements ChainAdapter withSolanaNamespace(c.chainId) === this.defaultChain.id) + if (chain) { + SolStoreUtil.setCurrentChain(chain) + } } this.syncNetwork()