Skip to content

Commit

Permalink
fix config
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyapotti committed Sep 20, 2024
1 parent 832b229 commit ecb93e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const Web3AuthProvider = defineComponent({

watch(
() => props.config,
() => {
(newConfig) => {
const resetHookState = () => {
provider.value = null;
userInfo.value = null;
Expand All @@ -106,7 +106,7 @@ export const Web3AuthProvider = defineComponent({
};

resetHookState();
const { web3AuthOptions, adapters = [], plugins = [] } = props.config;
const { web3AuthOptions, adapters = [], plugins = [] } = newConfig;
const web3AuthInstance = new Web3Auth(web3AuthOptions);
if (adapters.length) adapters.map((adapter) => web3AuthInstance.configureAdapter(adapter));
if (plugins.length) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const Web3AuthProvider = defineComponent({

watch(
() => props.config,
() => {
(newConfig) => {
const resetHookState = () => {
provider.value = null;
userInfo.value = null;
Expand All @@ -107,7 +107,7 @@ export const Web3AuthProvider = defineComponent({
};

resetHookState();
const { web3AuthOptions, adapters = [], plugins = [] } = props.config;
const { web3AuthOptions, adapters = [], plugins = [] } = newConfig;
const web3AuthInstance = new Web3AuthNoModal(web3AuthOptions);
if (adapters.length) adapters.map((adapter) => web3AuthInstance.configureAdapter(adapter));
if (plugins.length) {
Expand Down

0 comments on commit ecb93e6

Please sign in to comment.