@web3auth/modal 8.6.3-alpha.0 → 8.8.0

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/modal.cjs.js CHANGED
@@ -175,7 +175,8 @@ class Web3Auth extends no_modal_namespaceObject.Web3AuthNoModal {
175
175
  try {
176
176
  projectConfig = await (0,base_.fetchProjectConfig)(this.options.clientId, this.options.web3AuthNetwork);
177
177
  } catch (e) {
178
- throw base_.WalletInitializationError.notReady("failed to fetch project configurations");
178
+ base_.log.error("Failed to fetch project configurations", e);
179
+ throw base_.WalletInitializationError.notReady("failed to fetch project configurations", e);
179
180
  }
180
181
  const {
181
182
  whitelabel
@@ -443,7 +444,7 @@ class Web3Auth extends no_modal_namespaceObject.Web3AuthNoModal {
443
444
  }
444
445
  }
445
446
  async connect() {
446
- if (!this.loginModal) throw new Error("Login modal is not initialized");
447
+ if (!this.loginModal) throw base_.WalletInitializationError.notReady("Login modal is not initialized");
447
448
  // if already connected return provider
448
449
  if (this.connectedAdapterName && this.status === base_.ADAPTER_STATUS.CONNECTED && this.provider) return this.provider;
449
450
  this.loginModal.open();
package/dist/modal.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { CHAIN_NAMESPACES, SOLANA_ADAPTERS, EVM_ADAPTERS, WalletInitializationError, fetchProjectConfig, WALLET_ADAPTERS, log, getChainConfig, ADAPTER_CATEGORY, ADAPTER_STATUS, ADAPTER_EVENTS } from '@web3auth/base';
1
+ import { CHAIN_NAMESPACES, SOLANA_ADAPTERS, EVM_ADAPTERS, WalletInitializationError, fetchProjectConfig, log, WALLET_ADAPTERS, getChainConfig, ADAPTER_CATEGORY, ADAPTER_STATUS, ADAPTER_EVENTS } from '@web3auth/base';
2
2
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
3
3
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
4
  import { CommonJRPCProvider } from '@web3auth/base-provider';
@@ -114,7 +114,8 @@ class Web3Auth extends Web3AuthNoModal {
114
114
  try {
115
115
  projectConfig = await fetchProjectConfig(this.options.clientId, this.options.web3AuthNetwork);
116
116
  } catch (e) {
117
- throw WalletInitializationError.notReady("failed to fetch project configurations");
117
+ log.error("Failed to fetch project configurations", e);
118
+ throw WalletInitializationError.notReady("failed to fetch project configurations", e);
118
119
  }
119
120
  const {
120
121
  whitelabel
@@ -382,7 +383,7 @@ class Web3Auth extends Web3AuthNoModal {
382
383
  }
383
384
  }
384
385
  async connect() {
385
- if (!this.loginModal) throw new Error("Login modal is not initialized");
386
+ if (!this.loginModal) throw WalletInitializationError.notReady("Login modal is not initialized");
386
387
  // if already connected return provider
387
388
  if (this.connectedAdapterName && this.status === ADAPTER_STATUS.CONNECTED && this.provider) return this.provider;
388
389
  this.loginModal.open();