Skip to content

Commit 8e3e76c

Browse files
authored
Merge pull request #1335 from Web3Auth/use-getchainconfig
Updated to v9.7 and getChainConfig
2 parents 3f3a1ff + d7b02f5 commit 8e3e76c

File tree

178 files changed

+25524
-35923
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+25524
-35923
lines changed

web-modal-sdk/account-abstraction-examples/aa-modal-quick-start/package-lock.json

Lines changed: 192 additions & 212 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web-modal-sdk/account-abstraction-examples/aa-modal-quick-start/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13-
"@web3auth/account-abstraction-provider": "9.5.1",
14-
"@web3auth/base": "9.5.1",
15-
"@web3auth/ethereum-provider": "9.5.1",
16-
"@web3auth/modal": "9.5.1",
13+
"@web3auth/account-abstraction-provider": "9.7.0",
14+
"@web3auth/base": "9.7.0",
15+
"@web3auth/ethereum-provider": "9.7.0",
16+
"@web3auth/modal": "9.7.0",
1717
"ethers": "^6.13.3",
1818
"react": "^18.3.1",
1919
"react-dom": "^18.3.1"

web-modal-sdk/account-abstraction-examples/aa-modal-quick-start/src/App.tsx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import "./App.css";
22

3-
import { CHAIN_NAMESPACES, IProvider, WEB3AUTH_NETWORK } from "@web3auth/base";
3+
import { IProvider, WEB3AUTH_NETWORK, getEvmChainConfig } from "@web3auth/base";
44
import { EthereumPrivateKeyProvider } from "@web3auth/ethereum-provider";
55
import { AccountAbstractionProvider, SafeSmartAccount } from "@web3auth/account-abstraction-provider";
66
import { Web3Auth, Web3AuthOptions } from "@web3auth/modal";
@@ -11,16 +11,8 @@ import RPC from "./ethersRPC";
1111

1212
const clientId = "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ"; // get from https://dashboard.web3auth.io
1313

14-
const chainConfig = {
15-
chainNamespace: CHAIN_NAMESPACES.EIP155,
16-
chainId: "0xaa36a7",
17-
rpcTarget: "https://rpc.ankr.com/eth_sepolia",
18-
displayName: "Ethereum Sepolia Testnet",
19-
blockExplorerUrl: "https://sepolia.etherscan.io",
20-
ticker: "ETH",
21-
tickerName: "Ethereum",
22-
logo: "https://cryptologos.cc/logos/ethereum-eth-logo.png",
23-
};
14+
// Get custom chain configs for your chain from https://web3auth.io/docs/connect-blockchain
15+
const chainConfig = getEvmChainConfig(0xaa36a7)!;
2416

2517
const pimlicoAPIKey = import.meta.env.VITE_API_KEY;
2618

@@ -139,7 +131,7 @@ function App() {
139131
uiConsole(signature);
140132
};
141133

142-
function uiConsole(...args: any[]): void {
134+
function uiConsole(...args: unknown[]): void {
143135
const el = document.querySelector("#console>p");
144136
if (el) {
145137
el.innerHTML = JSON.stringify(args || {}, null, 2);

0 commit comments

Comments
 (0)