Skip to content

Commit

Permalink
Update home.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
wendychaung committed Aug 18, 2023
1 parent 2460692 commit 2cecbdf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,11 @@ function Home() {

const switchChain = async () =>{
const { ethereum} = window as any;

console.log(chainIdstr)


const ChainArr:any = ChainJson.filter(item=>item.chainId === Number(chainIdstr));
console.log(ChainArr)
const { chain,nativeCurrency:{name,symbol,decimals},rpc,explorers,chainId } = ChainArr[0];
console.log(ChainArr[0])
// const { chain,nativeCurrency:{name,symbol,decimals},rpc,explorers,chainId } = ChainArr[0];
const { chainId } = ChainArr[0];

// ethereum.request({
// method: 'wallet_addEthereumChain',
Expand Down

0 comments on commit 2cecbdf

Please sign in to comment.