Skip to content

Commit

Permalink
update window.ethereum usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ianrowan committed Sep 10, 2024
1 parent eb26db5 commit 3e6b13f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class MetamaskWebWalletController implements IWebWallet<string> {
const communityChain = chainId ?? this.getChainId();
const chainIdHex = `0x${parseInt(communityChain, 10).toString(16)}`;
try {
await window.ethereum.request({
await this._web3.givenProvider.request({
method: 'wallet_switchEthereumChain',
params: [{ chainId: chainIdHex }],
});
Expand Down

0 comments on commit 3e6b13f

Please sign in to comment.