@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/cjs/index.js CHANGED
@@ -2800,11 +2800,16 @@ var allClients = {
2800
2800
  };
2801
2801
 
2802
2802
  const initializeProviders = async (providers, nodeConfig, algosdkStatic) => {
2803
- const initializedProviders = {};
2804
2803
  if (typeof window === 'undefined') {
2805
2804
  debugLog('Window object is not available, skipping initialization');
2806
- return initializedProviders;
2807
- }
2805
+ return {};
2806
+ }
2807
+ // Set all providers to null to preserve order
2808
+ const initializedProviders = providers.reduce((acc, provider) => {
2809
+ const providerId = typeof provider === 'string' ? provider : provider.id;
2810
+ acc[providerId] = null;
2811
+ return acc;
2812
+ }, {});
2808
2813
  const { network = DEFAULT_NETWORK, nodeServer = DEFAULT_NODE_BASEURL, nodePort = DEFAULT_NODE_PORT, nodeToken = DEFAULT_NODE_TOKEN } = nodeConfig || {};
2809
2814
  const initClient = async (provider) => {
2810
2815
  const { id, ...providerConfig } = typeof provider === 'string' ? { id: provider } : provider;