@txnlab/use-wallet 2.1.2 → 2.1.3

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/dist/esm/index.js CHANGED
@@ -2798,11 +2798,16 @@ var allClients = {
2798
2798
  };
2799
2799
 
2800
2800
  const initializeProviders = async (providers, nodeConfig, algosdkStatic) => {
2801
- const initializedProviders = {};
2802
2801
  if (typeof window === 'undefined') {
2803
2802
  debugLog('Window object is not available, skipping initialization');
2804
- return initializedProviders;
2805
- }
2803
+ return {};
2804
+ }
2805
+ // Set all providers to null to preserve order
2806
+ const initializedProviders = providers.reduce((acc, provider) => {
2807
+ const providerId = typeof provider === 'string' ? provider : provider.id;
2808
+ acc[providerId] = null;
2809
+ return acc;
2810
+ }, {});
2806
2811
  const { network = DEFAULT_NETWORK, nodeServer = DEFAULT_NODE_BASEURL, nodePort = DEFAULT_NODE_PORT, nodeToken = DEFAULT_NODE_TOKEN } = nodeConfig || {};
2807
2812
  const initClient = async (provider) => {
2808
2813
  const { id, ...providerConfig } = typeof provider === 'string' ? { id: provider } : provider;
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "url": "https://github.com/txnlab/use-wallet/issues"
13
13
  },
14
14
  "homepage": "https://txnlab.github.io/use-wallet",
15
- "version": "2.1.2",
15
+ "version": "2.1.3",
16
16
  "description": "React hooks for using Algorand compatible wallets in dApps.",
17
17
  "scripts": {
18
18
  "dev": "yarn storybook",