diff --git a/packages/hooks/modal-react-hooks/.eslintrc.json b/packages/hooks/modal-react-hooks/.eslintrc.json new file mode 100644 index 000000000..f800d5d3a --- /dev/null +++ b/packages/hooks/modal-react-hooks/.eslintrc.json @@ -0,0 +1,29 @@ +{ + "root": true, + "extends": ["@toruslabs/eslint-config-react"], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "sourceType": "module", + "ecmaVersion": 11, + "project": "./tsconfig.json" + }, + "rules": { + "no-console": 2, + "@typescript-eslint/no-throw-literal": 0, + "import/extensions": [ + "error", + "ignorePackages", + { + "js": "never", + "jsx": "never", + "ts": "never", + "tsx": "never" + } + ] + }, + "env": { + "es2020": true, + "browser": true, + "node": true + } +} diff --git a/packages/hooks/modal-react-hooks/src/Web3AuthProvider.ts b/packages/hooks/modal-react-hooks/src/Web3AuthProvider.ts index 1c52044c3..d5483d071 100644 --- a/packages/hooks/modal-react-hooks/src/Web3AuthProvider.ts +++ b/packages/hooks/modal-react-hooks/src/Web3AuthProvider.ts @@ -25,7 +25,7 @@ export function Web3AuthProvider(params: PropsWithChildren web3Instance.configureAdapter(adapter)); if (plugins.length) plugins.map((plugin) => web3Instance.addPlugin(plugin)); setWeb3Auth(web3Instance); - }, []); + }, [config]); const props = { value: web3Auth }; return createElement(Web3AuthContext.Provider, props, children);