@web3auth/modal 8.2.0 → 8.2.1
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 +11 -2
- package/dist/modal.esm.js +11 -2
- package/dist/modal.umd.min.js +1 -1
- package/package.json +8 -8
package/dist/modal.cjs.js
CHANGED
|
@@ -173,7 +173,7 @@ class Web3Auth extends no_modal_namespaceObject.Web3AuthNoModal {
|
|
|
173
173
|
super.checkInitRequirements();
|
|
174
174
|
let projectConfig;
|
|
175
175
|
try {
|
|
176
|
-
projectConfig = await (0,base_.fetchProjectConfig)(this.options.clientId);
|
|
176
|
+
projectConfig = await (0,base_.fetchProjectConfig)(this.options.clientId, this.options.web3AuthNetwork);
|
|
177
177
|
} catch (e) {
|
|
178
178
|
throw base_.WalletInitializationError.notReady("failed to fetch project configurations");
|
|
179
179
|
}
|
|
@@ -188,7 +188,8 @@ class Web3Auth extends no_modal_namespaceObject.Web3AuthNoModal {
|
|
|
188
188
|
}));
|
|
189
189
|
this.subscribeToLoginModalEvents();
|
|
190
190
|
const {
|
|
191
|
-
sms_otp_enabled: smsOtpEnabled
|
|
191
|
+
sms_otp_enabled: smsOtpEnabled,
|
|
192
|
+
whitelist
|
|
192
193
|
} = projectConfig;
|
|
193
194
|
if (smsOtpEnabled !== undefined) {
|
|
194
195
|
var _params;
|
|
@@ -268,6 +269,9 @@ class Web3Auth extends no_modal_namespaceObject.Web3AuthNoModal {
|
|
|
268
269
|
}
|
|
269
270
|
};
|
|
270
271
|
}
|
|
272
|
+
if (whitelist) {
|
|
273
|
+
finalOpenloginAdapterSettings.originData = whitelist.signed_urls;
|
|
274
|
+
}
|
|
271
275
|
if (this.options.uiConfig.uxMode) {
|
|
272
276
|
finalOpenloginAdapterSettings.uxMode = this.options.uiConfig.uxMode;
|
|
273
277
|
}
|
|
@@ -328,6 +332,11 @@ class Web3Auth extends no_modal_namespaceObject.Web3AuthNoModal {
|
|
|
328
332
|
}
|
|
329
333
|
});
|
|
330
334
|
}
|
|
335
|
+
if (whitelist) {
|
|
336
|
+
openloginAdapter.setAdapterSettings({
|
|
337
|
+
originData: whitelist.signed_urls
|
|
338
|
+
});
|
|
339
|
+
}
|
|
331
340
|
if ((_this$options$uiConfi = this.options.uiConfig) !== null && _this$options$uiConfi !== void 0 && _this$options$uiConfi.uxMode) {
|
|
332
341
|
openloginAdapter.setAdapterSettings({
|
|
333
342
|
uxMode: this.options.uiConfig.uxMode
|
package/dist/modal.esm.js
CHANGED
|
@@ -112,7 +112,7 @@ class Web3Auth extends Web3AuthNoModal {
|
|
|
112
112
|
super.checkInitRequirements();
|
|
113
113
|
let projectConfig;
|
|
114
114
|
try {
|
|
115
|
-
projectConfig = await fetchProjectConfig(this.options.clientId);
|
|
115
|
+
projectConfig = await fetchProjectConfig(this.options.clientId, this.options.web3AuthNetwork);
|
|
116
116
|
} catch (e) {
|
|
117
117
|
throw WalletInitializationError.notReady("failed to fetch project configurations");
|
|
118
118
|
}
|
|
@@ -127,7 +127,8 @@ class Web3Auth extends Web3AuthNoModal {
|
|
|
127
127
|
}));
|
|
128
128
|
this.subscribeToLoginModalEvents();
|
|
129
129
|
const {
|
|
130
|
-
sms_otp_enabled: smsOtpEnabled
|
|
130
|
+
sms_otp_enabled: smsOtpEnabled,
|
|
131
|
+
whitelist
|
|
131
132
|
} = projectConfig;
|
|
132
133
|
if (smsOtpEnabled !== undefined) {
|
|
133
134
|
var _params;
|
|
@@ -207,6 +208,9 @@ class Web3Auth extends Web3AuthNoModal {
|
|
|
207
208
|
}
|
|
208
209
|
};
|
|
209
210
|
}
|
|
211
|
+
if (whitelist) {
|
|
212
|
+
finalOpenloginAdapterSettings.originData = whitelist.signed_urls;
|
|
213
|
+
}
|
|
210
214
|
if (this.options.uiConfig.uxMode) {
|
|
211
215
|
finalOpenloginAdapterSettings.uxMode = this.options.uiConfig.uxMode;
|
|
212
216
|
}
|
|
@@ -267,6 +271,11 @@ class Web3Auth extends Web3AuthNoModal {
|
|
|
267
271
|
}
|
|
268
272
|
});
|
|
269
273
|
}
|
|
274
|
+
if (whitelist) {
|
|
275
|
+
openloginAdapter.setAdapterSettings({
|
|
276
|
+
originData: whitelist.signed_urls
|
|
277
|
+
});
|
|
278
|
+
}
|
|
270
279
|
if ((_this$options$uiConfi = this.options.uiConfig) !== null && _this$options$uiConfi !== void 0 && _this$options$uiConfi.uxMode) {
|
|
271
280
|
openloginAdapter.setAdapterSettings({
|
|
272
281
|
uxMode: this.options.uiConfig.uxMode
|