@web3auth/modal 10.0.3 → 10.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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  var noModal = require('@web3auth/no-modal');
4
4
 
5
- const version = "10.0.3";
5
+ const version = "10.0.5";
6
6
  const defaultConnectorsModalConfig = {
7
7
  hideWalletDiscovery: false,
8
8
  connectors: {
@@ -118,7 +118,10 @@ class Web3Auth extends noModal.Web3AuthNoModal {
118
118
  this.analytics.setGlobalProperties({
119
119
  dapp_url: window.location.origin,
120
120
  sdk_name: noModal.ANALYTICS_SDK_TYPE.WEB_MODAL,
121
- sdk_version: noModal.sdkVersion
121
+ sdk_version: noModal.sdkVersion,
122
+ // Required for organization analytics
123
+ web3auth_client_id: this.options.clientId,
124
+ web3auth_network: this.options.web3AuthNetwork
122
125
  });
123
126
  let trackData = {};
124
127
  try {
@@ -169,8 +169,15 @@ class LoginModal {
169
169
  }));
170
170
  const isDefaultColors = ((_this$uiConfig = this.uiConfig) === null || _this$uiConfig === void 0 || (_this$uiConfig = _this$uiConfig.theme) === null || _this$uiConfig === void 0 ? void 0 : _this$uiConfig.primary) === constants.DEFAULT_PRIMARY_COLOR && ((_this$uiConfig$theme = this.uiConfig.theme) === null || _this$uiConfig$theme === void 0 ? void 0 : _this$uiConfig$theme.onPrimary) === constants.DEFAULT_ON_PRIMARY_COLOR;
171
171
  if ((_this$uiConfig2 = this.uiConfig) !== null && _this$uiConfig2 !== void 0 && _this$uiConfig2.theme && !isDefaultColors) {
172
- const rootElement = document.getElementById("w3a-parent-container");
173
- auth.applyWhiteLabelTheme(rootElement, this.uiConfig.theme);
172
+ import('color').then(({
173
+ default: Color
174
+ }) => {
175
+ const rootElement = document.getElementById("w3a-parent-container");
176
+ auth.applyWhiteLabelTheme(Color, rootElement, this.uiConfig.theme);
177
+ return;
178
+ }).catch(error => {
179
+ noModal.log.error(error);
180
+ });
174
181
  }
175
182
  });
176
183
  });
@@ -6,6 +6,7 @@ export declare const defaultWagmiConfig: import("wagmi").Config<readonly [{
6
6
  readonly apiUrl: "https://api.etherscan.io/api";
7
7
  };
8
8
  };
9
+ blockTime?: number | undefined | undefined;
9
10
  contracts: {
10
11
  readonly ensRegistry: {
11
12
  readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
@@ -6,6 +6,7 @@ export declare const defaultWagmiConfig: import("wagmi").Config<readonly [{
6
6
  readonly apiUrl: "https://api.etherscan.io/api";
7
7
  };
8
8
  };
9
+ blockTime?: number | undefined | undefined;
9
10
  contracts: {
10
11
  readonly ensRegistry: {
11
12
  readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
@@ -1,6 +1,6 @@
1
1
  import { EVM_CONNECTORS } from '@web3auth/no-modal';
2
2
 
3
- const version = "10.0.3";
3
+ const version = "10.0.5";
4
4
  const defaultConnectorsModalConfig = {
5
5
  hideWalletDiscovery: false,
6
6
  connectors: {
@@ -120,7 +120,10 @@ class Web3Auth extends Web3AuthNoModal {
120
120
  this.analytics.setGlobalProperties({
121
121
  dapp_url: window.location.origin,
122
122
  sdk_name: ANALYTICS_SDK_TYPE.WEB_MODAL,
123
- sdk_version: sdkVersion
123
+ sdk_version: sdkVersion,
124
+ // Required for organization analytics
125
+ web3auth_client_id: this.options.clientId,
126
+ web3auth_network: this.options.web3AuthNetwork
124
127
  });
125
128
  let trackData = {};
126
129
  try {
@@ -169,8 +169,15 @@ class LoginModal {
169
169
  }));
170
170
  const isDefaultColors = ((_this$uiConfig = this.uiConfig) === null || _this$uiConfig === void 0 || (_this$uiConfig = _this$uiConfig.theme) === null || _this$uiConfig === void 0 ? void 0 : _this$uiConfig.primary) === DEFAULT_PRIMARY_COLOR && ((_this$uiConfig$theme = this.uiConfig.theme) === null || _this$uiConfig$theme === void 0 ? void 0 : _this$uiConfig$theme.onPrimary) === DEFAULT_ON_PRIMARY_COLOR;
171
171
  if ((_this$uiConfig2 = this.uiConfig) !== null && _this$uiConfig2 !== void 0 && _this$uiConfig2.theme && !isDefaultColors) {
172
- const rootElement = document.getElementById("w3a-parent-container");
173
- applyWhiteLabelTheme(rootElement, this.uiConfig.theme);
172
+ import('color').then(({
173
+ default: Color
174
+ }) => {
175
+ const rootElement = document.getElementById("w3a-parent-container");
176
+ applyWhiteLabelTheme(Color, rootElement, this.uiConfig.theme);
177
+ return;
178
+ }).catch(error => {
179
+ log.error(error);
180
+ });
174
181
  }
175
182
  });
176
183
  });