updating chainId to "0x89"
Some checks failed
Workflow push to Dappbundle / Build (push) Has been cancelled

This commit is contained in:
SaketAnand 2024-10-03 14:12:34 +05:30
parent 9937316b35
commit eee626cd24
2 changed files with 7 additions and 4 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}

View File

@ -751,7 +751,7 @@
// setMetaMaskStatus(window.ethereum.isConnected())
window.ethereum.on("chainChanged", (chainId) => {
window.currentChainId = chainId;
if (chainId !== "0x1") {
if (chainId !== "0x89") {
renderError("Please switch MetaMask to Matic Mainnet");
} else {
router.routeTo(location.hash);
@ -763,7 +763,7 @@
})
.then((chainId) => {
window.currentChainId = chainId;
if (chainId !== "0x38") {
if (chainId !== "0x89") {
renderError("Please switch MetaMask to Matic Wallet Mainnet");
} else {
router.routeTo(location.hash);
@ -907,7 +907,7 @@
);
if (
window.ethereum &&
!(window.currentChainId && window.currentChainId === "0x1")
!(window.currentChainId && window.currentChainId === "0x89")
) {
renderError("Please switch MetaMask to MATIC Mainnet");
}
@ -1394,7 +1394,7 @@
);
if (
window.ethereum &&
!(window.currentChainId && window.currentChainId === "0x1")
!(window.currentChainId && window.currentChainId === "0x89")
) {
renderError("Please switch MetaMask to MATIC Mainnet");
}