Skip to content

Commit

Permalink
Use deepClone instead function
Browse files Browse the repository at this point in the history
  • Loading branch information
hieu-w committed Sep 2, 2024
1 parent 915d09d commit 41206e0
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 = {
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 = clonedeep(defaultOtherModalConfig);

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

0 comments on commit 41206e0

Please sign in to comment.