@web3auth/no-modal 10.0.5 → 10.2.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.
@@ -145,7 +145,7 @@ const getWalletServicesAnalyticsProperties = walletServicesConfig => {
145
145
  ws_default_portfolio: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig1 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig1 === void 0 ? void 0 : _walletServicesConfig1.defaultPortfolio
146
146
  };
147
147
  };
148
- const sdkVersion = "10.0.5";
148
+ const sdkVersion = "10.2.0";
149
149
  const getErrorAnalyticsProperties = error => {
150
150
  try {
151
151
  const code = error instanceof index.Web3AuthError ? error.code : error === null || error === void 0 ? void 0 : error.code;
@@ -97,6 +97,7 @@ class AuthConnector extends baseConnector.BaseConnector {
97
97
  case baseControllers.CHAIN_NAMESPACES.EIP155:
98
98
  case baseControllers.CHAIN_NAMESPACES.SOLANA:
99
99
  {
100
+ var _this$wsSettings$whit, _this$authOptions$whi, _this$wsSettings$whit2, _this$authOptions$whi2;
100
101
  const {
101
102
  default: WsEmbed
102
103
  } = await import('@web3auth/ws-embed');
@@ -106,10 +107,17 @@ class AuthConnector extends baseConnector.BaseConnector {
106
107
  modalZIndex: this.wsSettings.modalZIndex
107
108
  });
108
109
  const wsSupportedChains = chains.filter(x => x.chainNamespace === baseControllers.CHAIN_NAMESPACES.EIP155 || x.chainNamespace === baseControllers.CHAIN_NAMESPACES.SOLANA);
110
+ const wsEmbedWhiteLabel = _objectSpread(_objectSpread(_objectSpread({}, this.authOptions.whiteLabel), this.wsSettings.whiteLabel), {}, {
111
+ logoLight: ((_this$wsSettings$whit = this.wsSettings.whiteLabel) === null || _this$wsSettings$whit === void 0 ? void 0 : _this$wsSettings$whit.logoLight) || ((_this$authOptions$whi = this.authOptions.whiteLabel) === null || _this$authOptions$whi === void 0 ? void 0 : _this$authOptions$whi.logoLight) || "",
112
+ logoDark: ((_this$wsSettings$whit2 = this.wsSettings.whiteLabel) === null || _this$wsSettings$whit2 === void 0 ? void 0 : _this$wsSettings$whit2.logoDark) || ((_this$authOptions$whi2 = this.authOptions.whiteLabel) === null || _this$authOptions$whi2 === void 0 ? void 0 : _this$authOptions$whi2.logoDark) || ""
113
+ });
109
114
  this.wsEmbedInstancePromise = this.wsEmbedInstance.init(_objectSpread(_objectSpread({}, this.wsSettings), {}, {
110
115
  chains: wsSupportedChains,
111
116
  chainId,
112
- whiteLabel: _objectSpread(_objectSpread({}, this.authOptions.whiteLabel), this.wsSettings.whiteLabel)
117
+ whiteLabel: _objectSpread(_objectSpread({}, wsEmbedWhiteLabel), {}, {
118
+ logoLight: wsEmbedWhiteLabel.logoLight || "",
119
+ logoDark: wsEmbedWhiteLabel.logoDark || ""
120
+ })
113
121
  })).then(() => {
114
122
  this.wsEmbedInstancePromise = null;
115
123
  return;
@@ -295,8 +303,8 @@ class AuthConnector extends baseConnector.BaseConnector {
295
303
  groupedAuthConnectionId
296
304
  } = params;
297
305
  const providerConfig = this.authConnectionConfig.find(x => {
298
- if (groupedAuthConnectionId) {
299
- return x.authConnection === authConnection && x.groupedAuthConnectionId === groupedAuthConnectionId;
306
+ if (groupedAuthConnectionId && authConnectionId) {
307
+ return x.authConnection === authConnection && x.groupedAuthConnectionId === groupedAuthConnectionId && x.authConnectionId === authConnectionId;
300
308
  }
301
309
  if (authConnectionId) {
302
310
  return x.authConnection === authConnection && x.authConnectionId === authConnectionId;
@@ -522,7 +522,10 @@ class Web3AuthNoModal extends auth.SafeEventEmitter {
522
522
  const isKeyExportEnabled = (_ref2 = (_this$coreOptions$wal4 = (_this$coreOptions$wal5 = this.coreOptions.walletServicesConfig) === null || _this$coreOptions$wal5 === void 0 ? void 0 : _this$coreOptions$wal5.enableKeyExport) !== null && _this$coreOptions$wal4 !== void 0 ? _this$coreOptions$wal4 : enableKeyExport) !== null && _ref2 !== void 0 ? _ref2 : true;
523
523
  this.coreOptions.walletServicesConfig = _objectSpread(_objectSpread({}, this.coreOptions.walletServicesConfig), {}, {
524
524
  confirmationStrategy,
525
- whiteLabel,
525
+ whiteLabel: _objectSpread(_objectSpread({}, whiteLabel), {}, {
526
+ logoLight: (whiteLabel === null || whiteLabel === void 0 ? void 0 : whiteLabel.logoLight) || "",
527
+ logoDark: (whiteLabel === null || whiteLabel === void 0 ? void 0 : whiteLabel.logoDark) || ""
528
+ }),
526
529
  enableKeyExport: isKeyExportEnabled
527
530
  });
528
531
  }
@@ -28,6 +28,7 @@ export declare const defaultWagmiConfig: import("wagmi").Config<readonly [{
28
28
  readonly symbol: "ETH";
29
29
  readonly decimals: 18;
30
30
  };
31
+ experimental_preconfirmationTime?: number | undefined | undefined;
31
32
  rpcUrls: {
32
33
  readonly default: {
33
34
  readonly http: readonly ["https://eth.merkle.io"];
@@ -28,6 +28,7 @@ export declare const defaultWagmiConfig: import("wagmi").Config<readonly [{
28
28
  readonly symbol: "ETH";
29
29
  readonly decimals: 18;
30
30
  };
31
+ experimental_preconfirmationTime?: number | undefined | undefined;
31
32
  rpcUrls: {
32
33
  readonly default: {
33
34
  readonly http: readonly ["https://eth.merkle.io"];
@@ -145,7 +145,7 @@ const getWalletServicesAnalyticsProperties = walletServicesConfig => {
145
145
  ws_default_portfolio: walletServicesConfig === null || walletServicesConfig === void 0 || (_walletServicesConfig1 = walletServicesConfig.whiteLabel) === null || _walletServicesConfig1 === void 0 ? void 0 : _walletServicesConfig1.defaultPortfolio
146
146
  };
147
147
  };
148
- const sdkVersion = "10.0.5";
148
+ const sdkVersion = "10.2.0";
149
149
  const getErrorAnalyticsProperties = error => {
150
150
  try {
151
151
  const code = error instanceof Web3AuthError ? error.code : error === null || error === void 0 ? void 0 : error.code;
@@ -93,6 +93,7 @@ class AuthConnector extends BaseConnector {
93
93
  case CHAIN_NAMESPACES.EIP155:
94
94
  case CHAIN_NAMESPACES.SOLANA:
95
95
  {
96
+ var _this$wsSettings$whit, _this$authOptions$whi, _this$wsSettings$whit2, _this$authOptions$whi2;
96
97
  const {
97
98
  default: WsEmbed
98
99
  } = await import('@web3auth/ws-embed');
@@ -102,10 +103,17 @@ class AuthConnector extends BaseConnector {
102
103
  modalZIndex: this.wsSettings.modalZIndex
103
104
  });
104
105
  const wsSupportedChains = chains.filter(x => x.chainNamespace === CHAIN_NAMESPACES.EIP155 || x.chainNamespace === CHAIN_NAMESPACES.SOLANA);
106
+ const wsEmbedWhiteLabel = _objectSpread(_objectSpread(_objectSpread({}, this.authOptions.whiteLabel), this.wsSettings.whiteLabel), {}, {
107
+ logoLight: ((_this$wsSettings$whit = this.wsSettings.whiteLabel) === null || _this$wsSettings$whit === void 0 ? void 0 : _this$wsSettings$whit.logoLight) || ((_this$authOptions$whi = this.authOptions.whiteLabel) === null || _this$authOptions$whi === void 0 ? void 0 : _this$authOptions$whi.logoLight) || "",
108
+ logoDark: ((_this$wsSettings$whit2 = this.wsSettings.whiteLabel) === null || _this$wsSettings$whit2 === void 0 ? void 0 : _this$wsSettings$whit2.logoDark) || ((_this$authOptions$whi2 = this.authOptions.whiteLabel) === null || _this$authOptions$whi2 === void 0 ? void 0 : _this$authOptions$whi2.logoDark) || ""
109
+ });
105
110
  this.wsEmbedInstancePromise = this.wsEmbedInstance.init(_objectSpread(_objectSpread({}, this.wsSettings), {}, {
106
111
  chains: wsSupportedChains,
107
112
  chainId,
108
- whiteLabel: _objectSpread(_objectSpread({}, this.authOptions.whiteLabel), this.wsSettings.whiteLabel)
113
+ whiteLabel: _objectSpread(_objectSpread({}, wsEmbedWhiteLabel), {}, {
114
+ logoLight: wsEmbedWhiteLabel.logoLight || "",
115
+ logoDark: wsEmbedWhiteLabel.logoDark || ""
116
+ })
109
117
  })).then(() => {
110
118
  this.wsEmbedInstancePromise = null;
111
119
  return;
@@ -294,8 +302,8 @@ class AuthConnector extends BaseConnector {
294
302
  groupedAuthConnectionId
295
303
  } = params;
296
304
  const providerConfig = this.authConnectionConfig.find(x => {
297
- if (groupedAuthConnectionId) {
298
- return x.authConnection === authConnection && x.groupedAuthConnectionId === groupedAuthConnectionId;
305
+ if (groupedAuthConnectionId && authConnectionId) {
306
+ return x.authConnection === authConnection && x.groupedAuthConnectionId === groupedAuthConnectionId && x.authConnectionId === authConnectionId;
299
307
  }
300
308
  if (authConnectionId) {
301
309
  return x.authConnection === authConnection && x.authConnectionId === authConnectionId;
@@ -531,7 +531,10 @@ class Web3AuthNoModal extends SafeEventEmitter {
531
531
  const isKeyExportEnabled = (_ref2 = (_this$coreOptions$wal4 = (_this$coreOptions$wal5 = this.coreOptions.walletServicesConfig) === null || _this$coreOptions$wal5 === void 0 ? void 0 : _this$coreOptions$wal5.enableKeyExport) !== null && _this$coreOptions$wal4 !== void 0 ? _this$coreOptions$wal4 : enableKeyExport) !== null && _ref2 !== void 0 ? _ref2 : true;
532
532
  this.coreOptions.walletServicesConfig = _objectSpread(_objectSpread({}, this.coreOptions.walletServicesConfig), {}, {
533
533
  confirmationStrategy,
534
- whiteLabel,
534
+ whiteLabel: _objectSpread(_objectSpread({}, whiteLabel), {}, {
535
+ logoLight: (whiteLabel === null || whiteLabel === void 0 ? void 0 : whiteLabel.logoLight) || "",
536
+ logoDark: (whiteLabel === null || whiteLabel === void 0 ? void 0 : whiteLabel.logoDark) || ""
537
+ }),
535
538
  enableKeyExport: isKeyExportEnabled
536
539
  });
537
540
  }