updating chainId to "0x89"
Some checks failed
Workflow push to Dappbundle / Build (push) Has been cancelled
Some checks failed
Workflow push to Dappbundle / Build (push) Has been cancelled
This commit is contained in:
parent
9937316b35
commit
eee626cd24
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"liveServer.settings.port": 5501
|
||||
}
|
||||
@ -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");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user