Skip to content

Commit

Permalink
Convert defaultOtherModalConfig to function instead of object.
Browse files Browse the repository at this point in the history
  • Loading branch information
hieu-w committed Aug 31, 2024
1 parent d698fbf commit 915d09d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/modal/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const defaultEvmWalletModalConfig: AdaptersModalConfig = {
},
};

export const defaultOtherModalConfig: AdaptersModalConfig = {
export const defaultOtherModalConfig = (): AdaptersModalConfig => ({
chainNamespace: CHAIN_NAMESPACES.OTHER,
adapters: {
[EVM_ADAPTERS.OPENLOGIN]: {
Expand All @@ -90,4 +90,4 @@ export const defaultOtherModalConfig: AdaptersModalConfig = {
showOnDesktop: true,
},
},
};
});
2 changes: 1 addition & 1 deletion packages/modal/src/modalManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class Web3Auth extends Web3AuthNoModal implements IWeb3AuthModal {

readonly options: Web3AuthOptions;

private modalConfig: AdaptersModalConfig = defaultOtherModalConfig;
private modalConfig: AdaptersModalConfig = defaultOtherModalConfig();

constructor(options: Web3AuthOptions) {
super(options);
Expand Down

0 comments on commit 915d09d

Please sign in to comment.