@web3auth/no-modal 8.5.0-alpha.3 → 8.6.0-alpha.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.
@@ -160,6 +160,7 @@ class Web3AuthNoModal extends openlogin_jrpc_namespaceObject.SafeEventEmitter {
160
160
  whitelabel
161
161
  } = projectConfig;
162
162
  this.coreOptions.uiConfig = external_lodash_merge_default()(external_lodash_clonedeep_default()(whitelabel), this.coreOptions.uiConfig);
163
+ if (!this.coreOptions.uiConfig.mode) this.coreOptions.uiConfig.mode = "light";
163
164
  const {
164
165
  sms_otp_enabled: smsOtpEnabled,
165
166
  whitelist
@@ -318,8 +319,19 @@ class Web3AuthNoModal extends openlogin_jrpc_namespaceObject.SafeEventEmitter {
318
319
  if (!plugin.SUPPORTED_ADAPTERS.includes(data.adapter)) {
319
320
  return;
320
321
  }
321
- await plugin.initWithWeb3Auth(this);
322
- await plugin.connect();
322
+ const {
323
+ openloginInstance
324
+ } = this.walletAdapters[this.connectedAdapterName];
325
+ const {
326
+ options,
327
+ sessionId,
328
+ sessionNamespace
329
+ } = openloginInstance || {};
330
+ await plugin.initWithWeb3Auth(this, options.whiteLabel);
331
+ await plugin.connect({
332
+ sessionId,
333
+ sessionNamespace
334
+ });
323
335
  } catch (error) {
324
336
  // swallow error if connector adapter doesn't supports this plugin.
325
337
  if (error.code === 5211) {
@@ -84,6 +84,7 @@ class Web3AuthNoModal extends SafeEventEmitter {
84
84
  whitelabel
85
85
  } = projectConfig;
86
86
  this.coreOptions.uiConfig = merge(clonedeep(whitelabel), this.coreOptions.uiConfig);
87
+ if (!this.coreOptions.uiConfig.mode) this.coreOptions.uiConfig.mode = "light";
87
88
  const {
88
89
  sms_otp_enabled: smsOtpEnabled,
89
90
  whitelist
@@ -242,8 +243,19 @@ class Web3AuthNoModal extends SafeEventEmitter {
242
243
  if (!plugin.SUPPORTED_ADAPTERS.includes(data.adapter)) {
243
244
  return;
244
245
  }
245
- await plugin.initWithWeb3Auth(this);
246
- await plugin.connect();
246
+ const {
247
+ openloginInstance
248
+ } = this.walletAdapters[this.connectedAdapterName];
249
+ const {
250
+ options,
251
+ sessionId,
252
+ sessionNamespace
253
+ } = openloginInstance || {};
254
+ await plugin.initWithWeb3Auth(this, options.whiteLabel);
255
+ await plugin.connect({
256
+ sessionId,
257
+ sessionNamespace
258
+ });
247
259
  } catch (error) {
248
260
  // swallow error if connector adapter doesn't supports this plugin.
249
261
  if (error.code === 5211) {