diff --git a/demo/custom-ui-react-app/src/config/chainConfig.ts b/demo/custom-ui-react-app/src/config/chainConfig.ts index cc651177b..9f16e5d31 100644 --- a/demo/custom-ui-react-app/src/config/chainConfig.ts +++ b/demo/custom-ui-react-app/src/config/chainConfig.ts @@ -5,7 +5,7 @@ export const CHAIN_CONFIG = { displayName: "Ethereum Mainnet", chainNamespace: CHAIN_NAMESPACES.EIP155, chainId: "0x1", - rpcTarget: `https://mainnet.infura.io/v3/776218ac4734478c90191dde8cae483c`, + rpcTarget: `https://rpc.ankr.com/eth`, blockExplorer: "https://etherscan.io/", ticker: "ETH", tickerName: "Ethereum", diff --git a/demo/react-app/package-lock.json b/demo/react-app/package-lock.json index 0d98983c0..e801a12a6 100644 --- a/demo/react-app/package-lock.json +++ b/demo/react-app/package-lock.json @@ -43,15 +43,15 @@ }, "../../packages/adapters/openlogin-adapter": { "name": "@web3auth/openlogin-adapter", - "version": "4.0.0-alpha.0", + "version": "4.2.2", "license": "ISC", "dependencies": { "@toruslabs/openlogin": "^2.10.0", "@toruslabs/openlogin-ed25519": "^2.0.0", - "@web3auth/base": "^4.0.0-alpha.0", - "@web3auth/base-provider": "^4.0.0-alpha.0", - "@web3auth/ethereum-provider": "^4.0.0-alpha.0", - "@web3auth/solana-provider": "^4.0.0-alpha.0", + "@web3auth/base": "^4.2.2", + "@web3auth/base-provider": "^4.2.2", + "@web3auth/ethereum-provider": "^4.2.2", + "@web3auth/solana-provider": "^4.2.2", "lodash.merge": "^4.6.2" }, "devDependencies": { @@ -63,7 +63,7 @@ }, "../../packages/base": { "name": "@web3auth/base", - "version": "4.0.0-alpha.0", + "version": "4.2.2", "license": "ISC", "dependencies": { "@toruslabs/http-helpers": "^3.2.0", @@ -73,33 +73,30 @@ "loglevel": "^1.8.1", "ts-custom-error": "^3.3.1" }, - "devDependencies": { - "@toruslabs/openlogin": "^2.10.0" - }, "peerDependencies": { "@babel/runtime": "^7.x" } }, "../../packages/modal": { "name": "@web3auth/modal", - "version": "4.0.0-alpha.0", + "version": "4.2.2", "license": "ISC", "dependencies": { - "@web3auth/base": "^4.0.0-alpha.0", - "@web3auth/core": "^4.0.0-alpha.0", - "@web3auth/metamask-adapter": "^4.0.0-alpha.0", - "@web3auth/openlogin-adapter": "^4.0.0-alpha.0", - "@web3auth/phantom-adapter": "^4.0.0-alpha.0", - "@web3auth/torus-evm-adapter": "^4.0.0-alpha.0", - "@web3auth/torus-solana-adapter": "^4.0.0-alpha.0", - "@web3auth/ui": "^4.0.0-alpha.0", - "@web3auth/wallet-connect-v1-adapter": "^4.0.0-alpha.0" + "@web3auth/base": "^4.2.2", + "@web3auth/core": "^4.2.2", + "@web3auth/metamask-adapter": "^4.2.2", + "@web3auth/openlogin-adapter": "^4.2.2", + "@web3auth/phantom-adapter": "^4.2.2", + "@web3auth/torus-evm-adapter": "^4.2.2", + "@web3auth/torus-solana-adapter": "^4.2.2", + "@web3auth/ui": "^4.2.2", + "@web3auth/wallet-connect-v1-adapter": "^4.2.2" }, "devDependencies": { "@svgr/webpack": "^6.5.1", + "@toruslabs/isomorphic-style-loader": "^5.3.3", "@toruslabs/openlogin": "^2.10.0", - "css-loader": "^6.7.2", - "isomorphic-style-loader": "^5.3.2", + "css-loader": "^6.7.3", "postcss-prefix-selector": "^1.16.0", "style-loader": "^3.3.1", "tailwindcss": "^3.2.4", @@ -111,29 +108,29 @@ }, "../../packages/providers/solana-provider": { "name": "@web3auth/solana-provider", - "version": "4.0.0-alpha.0", + "version": "4.2.2", "license": "ISC", "dependencies": { - "@solana/web3.js": "^1.69.0", "@toruslabs/base-controllers": "^2.5.0", "@toruslabs/openlogin-jrpc": "^2.9.0", "@toruslabs/tweetnacl-js": "^1.0.3", - "@web3auth/base": "^4.0.0-alpha.0", - "@web3auth/base-provider": "^4.0.0-alpha.0", + "@web3auth/base": "^4.2.2", + "@web3auth/base-provider": "^4.2.2", "bn.js": "^5.2.1", "bs58": "^4.0.1", "eth-rpc-errors": "^4.0.3", "json-rpc-random-id": "^1.0.1" }, "devDependencies": { - "@project-serum/sol-wallet-adapter": "^0.2.6", - "@solflare-wallet/sdk": "^1.1.0", + "@solana/web3.js": "^1.73.0", + "@solflare-wallet/sdk": "^1.2.0", "@types/bn.js": "^5.1.1", "@types/bs58": "^4.0.1", "@types/json-rpc-random-id": "^1.0.1" }, "peerDependencies": { - "@babel/runtime": "^7.x" + "@babel/runtime": "^7.x", + "@solana/web3.js": "^1.x" } }, "node_modules/@ampproject/remapping": { @@ -24963,18 +24960,18 @@ "version": "file:../../packages/modal", "requires": { "@svgr/webpack": "^6.5.1", + "@toruslabs/isomorphic-style-loader": "^5.3.3", "@toruslabs/openlogin": "^2.10.0", - "@web3auth/base": "^4.0.0-alpha.0", - "@web3auth/core": "^4.0.0-alpha.0", - "@web3auth/metamask-adapter": "^4.0.0-alpha.0", - "@web3auth/openlogin-adapter": "^4.0.0-alpha.0", - "@web3auth/phantom-adapter": "^4.0.0-alpha.0", - "@web3auth/torus-evm-adapter": "^4.0.0-alpha.0", - "@web3auth/torus-solana-adapter": "^4.0.0-alpha.0", - "@web3auth/ui": "^4.0.0-alpha.0", - "@web3auth/wallet-connect-v1-adapter": "^4.0.0-alpha.0", - "css-loader": "^6.7.2", - "isomorphic-style-loader": "^5.3.2", + "@web3auth/base": "^4.2.2", + "@web3auth/core": "^4.2.2", + "@web3auth/metamask-adapter": "^4.2.2", + "@web3auth/openlogin-adapter": "^4.2.2", + "@web3auth/phantom-adapter": "^4.2.2", + "@web3auth/torus-evm-adapter": "^4.2.2", + "@web3auth/torus-solana-adapter": "^4.2.2", + "@web3auth/ui": "^4.2.2", + "@web3auth/wallet-connect-v1-adapter": "^4.2.2", + "css-loader": "^6.7.3", "postcss-prefix-selector": "^1.16.0", "style-loader": "^3.3.1", "tailwindcss": "^3.2.4", @@ -24987,27 +24984,26 @@ "@toruslabs/openlogin": "^2.10.0", "@toruslabs/openlogin-ed25519": "^2.0.0", "@types/lodash.merge": "^4.6.7", - "@web3auth/base": "^4.0.0-alpha.0", - "@web3auth/base-provider": "^4.0.0-alpha.0", - "@web3auth/ethereum-provider": "^4.0.0-alpha.0", - "@web3auth/solana-provider": "^4.0.0-alpha.0", + "@web3auth/base": "^4.2.2", + "@web3auth/base-provider": "^4.2.2", + "@web3auth/ethereum-provider": "^4.2.2", + "@web3auth/solana-provider": "^4.2.2", "lodash.merge": "^4.6.2" } }, "@web3auth/solana-provider": { "version": "file:../../packages/providers/solana-provider", "requires": { - "@project-serum/sol-wallet-adapter": "^0.2.6", - "@solana/web3.js": "^1.69.0", - "@solflare-wallet/sdk": "^1.1.0", + "@solana/web3.js": "^1.73.0", + "@solflare-wallet/sdk": "^1.2.0", "@toruslabs/base-controllers": "^2.5.0", "@toruslabs/openlogin-jrpc": "^2.9.0", "@toruslabs/tweetnacl-js": "^1.0.3", "@types/bn.js": "^5.1.1", "@types/bs58": "^4.0.1", "@types/json-rpc-random-id": "^1.0.1", - "@web3auth/base": "^4.0.0-alpha.0", - "@web3auth/base-provider": "^4.0.0-alpha.0", + "@web3auth/base": "^4.2.2", + "@web3auth/base-provider": "^4.2.2", "bn.js": "^5.2.1", "bs58": "^4.0.1", "eth-rpc-errors": "^4.0.3", diff --git a/demo/react-app/src/config/chainConfig.ts b/demo/react-app/src/config/chainConfig.ts index bc4806c34..a6eed82f5 100644 --- a/demo/react-app/src/config/chainConfig.ts +++ b/demo/react-app/src/config/chainConfig.ts @@ -5,7 +5,7 @@ export const CHAIN_CONFIG = { displayName: "Ethereum Mainnet", chainNamespace: CHAIN_NAMESPACES.EIP155, chainId: "0x1", - rpcTarget: `https://mainnet.infura.io/v3/776218ac4734478c90191dde8cae483c`, + rpcTarget: `https://rpc.ankr.com/eth`, blockExplorer: "https://etherscan.io/", ticker: "ETH", tickerName: "Ethereum", diff --git a/demo/react-app/src/services/web3auth.tsx b/demo/react-app/src/services/web3auth.tsx index 4289fe887..3fc44e75d 100644 --- a/demo/react-app/src/services/web3auth.tsx +++ b/demo/react-app/src/services/web3auth.tsx @@ -102,8 +102,8 @@ export const Web3AuthProvider: FunctionComponent = ({ children, clientId, uiConfig: { defaultLanguage: "en", - theme:"dark", - } + theme: "dark", + }, }); const adapter = new OpenloginAdapter({ adapterSettings: { network: web3AuthNetwork, clientId } }); web3AuthInstance.configureAdapter(adapter); diff --git a/packages/ui/src/loginModal.tsx b/packages/ui/src/loginModal.tsx index 338f13578..7b9ef4b9c 100644 --- a/packages/ui/src/loginModal.tsx +++ b/packages/ui/src/loginModal.tsx @@ -24,9 +24,13 @@ import { ExternalWalletEventType, LOGIN_MODAL_EVENTS, MODAL_STATUS, ModalState, const DEFAULT_LOGO_URL = "https://images.web3auth.io/web3auth-logo.svg"; function createWrapper(parentZIndex: string): HTMLElement { + const existingWrapper = document.getElementById("w3a-container"); + if (existingWrapper) return existingWrapper; + const parent = document.createElement("section"); parent.classList.add("w3a-parent-container"); parent.style.zIndex = parentZIndex; + parent.style.position = "relative"; const wrapper = document.createElement("section"); wrapper.setAttribute("id", "w3a-container"); parent.appendChild(wrapper);