@openfort/react-native 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,4 +17,4 @@
17
17
  # Openfort React Native SDK
18
18
 
19
19
  Quickstart sample:
20
- https://github.com/openfort-xyz/react-native-auth-sample
20
+ https://github.com/openfort-xyz/react-native-auth-sample
@@ -175,8 +175,25 @@ export function useEmbeddedEthereumWallet(options = {}) {
175
175
  }
176
176
  return policy;
177
177
  };
178
- return await client.embeddedWallet.getEthereumProvider({ announceProvider: false, policy: resolvePolicy() });
179
- }, [client.embeddedWallet, walletConfig, options.chainId]);
178
+ // Build chains map from supportedChains (chainId -> rpcUrl)
179
+ const resolveChains = () => {
180
+ if (!supportedChains || supportedChains.length === 0)
181
+ return undefined;
182
+ const chainsMap = {};
183
+ for (const chain of supportedChains) {
184
+ const rpcUrl = chain.rpcUrls?.default?.http?.[0];
185
+ if (rpcUrl) {
186
+ chainsMap[chain.id] = rpcUrl;
187
+ }
188
+ }
189
+ return Object.keys(chainsMap).length > 0 ? chainsMap : undefined;
190
+ };
191
+ return await client.embeddedWallet.getEthereumProvider({
192
+ announceProvider: false,
193
+ policy: resolvePolicy(),
194
+ chains: resolveChains(),
195
+ });
196
+ }, [client.embeddedWallet, walletConfig, options.chainId, supportedChains]);
180
197
  // Initialize provider when recovering an active wallet on mount
181
198
  useEffect(() => {
182
199
  // Only initialize if we have an account but no provider
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfort/react-native",
3
3
  "main": "dist/index.js",
4
- "version": "1.0.4",
4
+ "version": "1.0.5",
5
5
  "license": "MIT",
6
6
  "description": "React Native SDK for Openfort platform integration",
7
7
  "repository": {
@@ -24,7 +24,7 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "@openfort/openfort-js": "^1.1.3"
27
+ "@openfort/openfort-js": "^1.1.4"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "expo-apple-authentication": "*",