From 483d8191d50b13f3548a42f012e98f55ec9d6542 Mon Sep 17 00:00:00 2001 From: shmuel Date: Sun, 6 Feb 2022 15:10:16 +0200 Subject: [PATCH 1/2] bugFix: network alert --- src/stores/user.store.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stores/user.store.js b/src/stores/user.store.js index 8d8cc44..3d056ae 100644 --- a/src/stores/user.store.js +++ b/src/stores/user.store.js @@ -114,7 +114,9 @@ class UserStore { const networkType = await this.web3.eth.net.getId() debugger if (!supportedNetworks[networkType.toString()]) { - EventBus.$emit("app-error", "Only Mainnet and Kovan testnet are supported"); + if(window.location.pathname == "/compound" || window.location.pathname == "/maker" || window.location.pathname == "/app"){ + EventBus.$emit("app-error", "Only Mainnet and Kovan testnet are supported"); + } return false; } runInAction(()=> { From c90d14abd7bc223494e891e33524c9784259b5cc Mon Sep 17 00:00:00 2001 From: shmuel Date: Sun, 6 Feb 2022 15:27:39 +0200 Subject: [PATCH 2/2] network alert fix --- src/stores/main.hundred.store.js | 1 - src/stores/user.store.js | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/stores/main.hundred.store.js b/src/stores/main.hundred.store.js index 6840c20..0226d03 100644 --- a/src/stores/main.hundred.store.js +++ b/src/stores/main.hundred.store.js @@ -30,7 +30,6 @@ class MainHundredStore { try{ const {data} = await axios.get('https://api.llama.fi/protocol/b.protocol') const {currentChainTvls} = data - debugger this.hundredTvlArbitrum = currentChainTvls.Arbitrum this.hundredTvlFantom = currentChainTvls.Fantom } catch (err) { diff --git a/src/stores/user.store.js b/src/stores/user.store.js index 3d056ae..785360a 100644 --- a/src/stores/user.store.js +++ b/src/stores/user.store.js @@ -18,7 +18,6 @@ import WalletSelectionModal from "../components/modals/WalletSelectionModal" const supportedNetworks = { "1": "Mainnet", "42": "Kovan", - "421611": "Arbitrum Testnet", "1137": "Hardhat" } @@ -112,9 +111,9 @@ class UserStore { // save connection data to local storage window.localStorage.setItem("walletType", this.walletType) const networkType = await this.web3.eth.net.getId() - debugger if (!supportedNetworks[networkType.toString()]) { - if(window.location.pathname == "/compound" || window.location.pathname == "/maker" || window.location.pathname == "/app"){ + const path = window.location.pathname + if(path == "/compound" || path == "/maker" || path == "/app"){ EventBus.$emit("app-error", "Only Mainnet and Kovan testnet are supported"); } return false;