diff --git a/packages/modal/src/config.ts b/packages/modal/src/config.ts index 63232ce75..3628494da 100644 --- a/packages/modal/src/config.ts +++ b/packages/modal/src/config.ts @@ -80,7 +80,7 @@ export const defaultEvmWalletModalConfig: AdaptersModalConfig = { }, }; -export const defaultOtherModalConfig = (): AdaptersModalConfig => ({ +export const defaultOtherModalConfig = { chainNamespace: CHAIN_NAMESPACES.OTHER, adapters: { [EVM_ADAPTERS.OPENLOGIN]: { @@ -90,4 +90,4 @@ export const defaultOtherModalConfig = (): AdaptersModalConfig => ({ showOnDesktop: true, }, }, -}); +}; diff --git a/packages/modal/src/modalManager.ts b/packages/modal/src/modalManager.ts index 38db48feb..ce66978ab 100644 --- a/packages/modal/src/modalManager.ts +++ b/packages/modal/src/modalManager.ts @@ -52,7 +52,7 @@ export class Web3Auth extends Web3AuthNoModal implements IWeb3AuthModal { readonly options: Web3AuthOptions; - private modalConfig: AdaptersModalConfig = defaultOtherModalConfig(); + private modalConfig: AdaptersModalConfig = clonedeep(defaultOtherModalConfig); constructor(options: Web3AuthOptions) { super(options);