@web3auth/modal 10.2.0 → 10.3.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.
- package/dist/lib.cjs/packages/modal/src/config.js +1 -1
- package/dist/lib.cjs/packages/modal/src/modalManager.js +2 -9
- package/dist/lib.cjs/types/modalManager.d.ts +1 -10
- package/dist/lib.cjs/types/react/wagmi/constants.d.ts +3 -6
- package/dist/lib.cjs/types/ui/components/Footer/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/SocialLoginList/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/helper/countryData.d.ts +7 -0
- package/dist/lib.cjs/types/vue/wagmi/constants.d.ts +3 -6
- package/dist/lib.esm/packages/modal/src/config.js +1 -1
- package/dist/lib.esm/packages/modal/src/modalManager.js +2 -9
- package/dist/modal.umd.min.js +1 -1
- package/package.json +13 -13
|
@@ -81,10 +81,7 @@ class Web3Auth extends noModal.Web3AuthNoModal {
|
|
|
81
81
|
return [...new Set(((_this$coreOptions$cha = this.coreOptions.chains) === null || _this$coreOptions$cha === void 0 ? void 0 : _this$coreOptions$cha.map(x => x.chainNamespace)) || [])];
|
|
82
82
|
});
|
|
83
83
|
this.options = _objectSpread({}, options);
|
|
84
|
-
if (!this.options.uiConfig) this.options.uiConfig = {
|
|
85
|
-
logoLight: "",
|
|
86
|
-
logoDark: ""
|
|
87
|
-
};
|
|
84
|
+
if (!this.options.uiConfig) this.options.uiConfig = {};
|
|
88
85
|
if (this.options.modalConfig) this.modalConfig = this.options.modalConfig;
|
|
89
86
|
noModal.log.info("modalConfig", this.modalConfig);
|
|
90
87
|
}
|
|
@@ -227,13 +224,9 @@ class Web3Auth extends noModal.Web3AuthNoModal {
|
|
|
227
224
|
this.options.uiConfig = deepmerge(noModal.cloneDeep(projectConfig.whitelabel || {}), this.options.uiConfig || {});
|
|
228
225
|
if (!this.options.uiConfig.defaultLanguage) this.options.uiConfig.defaultLanguage = utils.getUserLanguage(this.options.uiConfig.defaultLanguage);
|
|
229
226
|
if (!this.options.uiConfig.mode) this.options.uiConfig.mode = "light";
|
|
230
|
-
|
|
227
|
+
this.options.uiConfig = deepmerge(projectConfig.loginModal || {}, this.options.uiConfig, {
|
|
231
228
|
arrayMerge: (_, sourceArray) => sourceArray
|
|
232
229
|
});
|
|
233
|
-
this.options.uiConfig = _objectSpread(_objectSpread({}, uiConfig), {}, {
|
|
234
|
-
logoLight: uiConfig.logoLight || "",
|
|
235
|
-
logoDark: uiConfig.logoDark || ""
|
|
236
|
-
});
|
|
237
230
|
// merge login methods order from project config and user config, with user config taking precedence
|
|
238
231
|
const defaultAuthConnections = projectConfig.embeddedWalletAuth.filter(x => x.isDefault).map(x => x.authConnection);
|
|
239
232
|
const mergedAuthConnections = [...(this.options.uiConfig.loginMethodsOrder || []), ...defaultAuthConnections];
|
|
@@ -5,16 +5,7 @@ export interface Web3AuthOptions extends IWeb3AuthCoreOptions {
|
|
|
5
5
|
/**
|
|
6
6
|
* Config for configuring modal ui display properties
|
|
7
7
|
*/
|
|
8
|
-
uiConfig
|
|
9
|
-
/**
|
|
10
|
-
* App logo to use in light mode
|
|
11
|
-
*/
|
|
12
|
-
logoLight: string;
|
|
13
|
-
/**
|
|
14
|
-
* App logo to use in dark mode
|
|
15
|
-
*/
|
|
16
|
-
logoDark: string;
|
|
17
|
-
};
|
|
8
|
+
uiConfig?: Omit<UIConfig, "connectorListener">;
|
|
18
9
|
/**
|
|
19
10
|
* Config for configuring modal ui display properties
|
|
20
11
|
*/
|
|
@@ -6,14 +6,11 @@ export declare const defaultWagmiConfig: import("wagmi").Config<readonly [{
|
|
|
6
6
|
readonly apiUrl: "https://api.etherscan.io/api";
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
-
blockTime
|
|
9
|
+
blockTime: 12000;
|
|
10
10
|
contracts: {
|
|
11
|
-
readonly ensRegistry: {
|
|
12
|
-
readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
|
13
|
-
};
|
|
14
11
|
readonly ensUniversalResolver: {
|
|
15
|
-
readonly address: "
|
|
16
|
-
readonly blockCreated:
|
|
12
|
+
readonly address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee";
|
|
13
|
+
readonly blockCreated: 23085558;
|
|
17
14
|
};
|
|
18
15
|
readonly multicall3: {
|
|
19
16
|
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
@@ -6,14 +6,11 @@ export declare const defaultWagmiConfig: import("wagmi").Config<readonly [{
|
|
|
6
6
|
readonly apiUrl: "https://api.etherscan.io/api";
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
-
blockTime
|
|
9
|
+
blockTime: 12000;
|
|
10
10
|
contracts: {
|
|
11
|
-
readonly ensRegistry: {
|
|
12
|
-
readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
|
13
|
-
};
|
|
14
11
|
readonly ensUniversalResolver: {
|
|
15
|
-
readonly address: "
|
|
16
|
-
readonly blockCreated:
|
|
12
|
+
readonly address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee";
|
|
13
|
+
readonly blockCreated: 23085558;
|
|
17
14
|
};
|
|
18
15
|
readonly multicall3: {
|
|
19
16
|
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
@@ -81,10 +81,7 @@ class Web3Auth extends Web3AuthNoModal {
|
|
|
81
81
|
return [...new Set(((_this$coreOptions$cha = this.coreOptions.chains) === null || _this$coreOptions$cha === void 0 ? void 0 : _this$coreOptions$cha.map(x => x.chainNamespace)) || [])];
|
|
82
82
|
});
|
|
83
83
|
this.options = _objectSpread({}, options);
|
|
84
|
-
if (!this.options.uiConfig) this.options.uiConfig = {
|
|
85
|
-
logoLight: "",
|
|
86
|
-
logoDark: ""
|
|
87
|
-
};
|
|
84
|
+
if (!this.options.uiConfig) this.options.uiConfig = {};
|
|
88
85
|
if (this.options.modalConfig) this.modalConfig = this.options.modalConfig;
|
|
89
86
|
log.info("modalConfig", this.modalConfig);
|
|
90
87
|
}
|
|
@@ -234,13 +231,9 @@ class Web3Auth extends Web3AuthNoModal {
|
|
|
234
231
|
this.options.uiConfig = deepmerge(cloneDeep(projectConfig.whitelabel || {}), this.options.uiConfig || {});
|
|
235
232
|
if (!this.options.uiConfig.defaultLanguage) this.options.uiConfig.defaultLanguage = getUserLanguage(this.options.uiConfig.defaultLanguage);
|
|
236
233
|
if (!this.options.uiConfig.mode) this.options.uiConfig.mode = "light";
|
|
237
|
-
|
|
234
|
+
this.options.uiConfig = deepmerge(projectConfig.loginModal || {}, this.options.uiConfig, {
|
|
238
235
|
arrayMerge: (_, sourceArray) => sourceArray
|
|
239
236
|
});
|
|
240
|
-
this.options.uiConfig = _objectSpread(_objectSpread({}, uiConfig), {}, {
|
|
241
|
-
logoLight: uiConfig.logoLight || "",
|
|
242
|
-
logoDark: uiConfig.logoDark || ""
|
|
243
|
-
});
|
|
244
237
|
|
|
245
238
|
// merge login methods order from project config and user config, with user config taking precedence
|
|
246
239
|
const defaultAuthConnections = projectConfig.embeddedWalletAuth.filter(x => x.isDefault).map(x => x.authConnection);
|