diff --git a/packages/base/adapters/solana/web3js/client.ts b/packages/base/adapters/solana/web3js/client.ts index e579b4fff3..fa577dfc51 100644 --- a/packages/base/adapters/solana/web3js/client.ts +++ b/packages/base/adapters/solana/web3js/client.ts @@ -715,7 +715,11 @@ export class SolanaWeb3JsClient implements ChainAdapter { + /** + * This is a fix for non-serializable objects that may prevent all the connectors in the list from being displayed + * Check more about this issue on https://valtio.dev/docs/api/basic/proxy#Gotchas + */ + try { + const canProxyConnector = Boolean(proxy(connector)) + + if (!canProxyConnector) { + throw new Error('Connector is not available') + } + + return true + } catch (error) { + // eslint-disable-next-line no-console + console.error('ConnectorController.setConnectors: Not possible to add connector', { + connector, + error + }) + + return false + } + }) state.connectors = this.mergeMultiChainConnectors(state.unMergedConnectors) },