@web3auth/modal 10.0.2 → 10.0.4

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.2";
5
+ const version = "10.0.4";
6
6
  const defaultConnectorsModalConfig = {
7
7
  hideWalletDiscovery: false,
8
8
  connectors: {
@@ -138,6 +138,9 @@ class Web3Auth extends noModal.Web3AuthNoModal {
138
138
  super.initChainsConfig(projectConfig);
139
139
  super.initCachedConnectorAndChainId();
140
140
  super.initWalletServicesConfig(projectConfig);
141
+ this.analytics.setGlobalProperties({
142
+ team_id: projectConfig.teamId
143
+ });
141
144
  trackData = this.getInitializationTrackData();
142
145
  // init login modal
143
146
  const {
@@ -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.2";
3
+ const version = "10.0.4";
4
4
  const defaultConnectorsModalConfig = {
5
5
  hideWalletDiscovery: false,
6
6
  connectors: {
@@ -141,6 +141,9 @@ class Web3Auth extends Web3AuthNoModal {
141
141
  super.initChainsConfig(projectConfig);
142
142
  super.initCachedConnectorAndChainId();
143
143
  super.initWalletServicesConfig(projectConfig);
144
+ this.analytics.setGlobalProperties({
145
+ team_id: projectConfig.teamId
146
+ });
144
147
  trackData = this.getInitializationTrackData();
145
148
 
146
149
  // init login modal
@@ -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
  });