File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ export function getConfig(id?: string) {
77 const { walletConnectProjectId, ethereumNodes } = useAppStore . getState ( )
88 const projectId = id || walletConnectProjectId
99
10- const urlsByChain = new Map ( ethereumNodes . map ( ( node ) => [ node . chainId , node . urls ] ) )
10+ const urlsByChain = new Map ( ethereumNodes . map ( ( node ) => [ Number ( node . chainId ) , node . urls ] ) )
1111
1212 // Prefer the backend-served public RPC nodes; fall back to viem's defaults
1313 // when the backend has no nodes for a chain (or the list could not be fetched).
1414 const transportFor = ( chainId : number ) => {
15- const urls = urlsByChain . get ( chainId )
15+ const urls = urlsByChain . get ( chainId ) ?. filter ( ( url ) => url . trim ( ) !== '' )
1616 return urls ?. length ? fallback ( urls . map ( ( url ) => http ( url ) ) ) : http ( )
1717 }
1818
You can’t perform that action at this time.
0 commit comments