diff --git a/src/bootstrap/app.js b/src/bootstrap/app.js
index 282122a..8972693 100644
--- a/src/bootstrap/app.js
+++ b/src/bootstrap/app.js
@@ -15,8 +15,6 @@ import { ChainIdProvider } from "../hooks/use-chain-id";
import { ArchonInitializer } from "./archon";
import ChainChangeWatcher from "./chain-change-watcher";
import drizzle, { DrizzleProvider, Initializer, useDrizzle } from "./drizzle";
-import ErrorBoundary from "../components/error-boundary";
-import SwitchChainFallback from "../components/error-fallback/switch-chain";
export default function App() {
const [isMenuClosed, setIsMenuClosed] = useState(true);
@@ -28,81 +26,75 @@ export default function App() {
- }
- loadingContractsAndAccounts={}
- loadingWeb3={}
- >
+ } loadingWeb3={}>
-
-
-
+
+
+
+ setIsMenuClosed((previousState) => !previousState)}
+ >
+
+
- setIsMenuClosed((previousState) => !previousState)}
- >
-
-
-
-
-
-
-
-
-
-
-
-
- {MenuItems}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- setIsMenuClosed(true)}
- />
-
+
+
+
+
+
+
+
+
+
+ {MenuItems}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ setIsMenuClosed(true)}
+ />
-
-
-
+
+
+
diff --git a/src/bootstrap/chain-change-watcher.js b/src/bootstrap/chain-change-watcher.js
index ce53e2e..ead54fe 100644
--- a/src/bootstrap/chain-change-watcher.js
+++ b/src/bootstrap/chain-change-watcher.js
@@ -1,12 +1,16 @@
-import { useEffect } from "react";
+import React, { useEffect } from "react";
import t from "prop-types";
import useChainId from "../hooks/use-chain-id";
import usePrevious from "../hooks/use-previous";
+import SwitchChainFallback from "../components/error-fallback/switch-chain";
+import { isSupportedChain } from "../api/side-chain";
export default function ChainChangeWatcher({ children }) {
- useReloadOnChainChanged();
+ const chainId = useChainId();
+ const isSupported = isSupportedChain(chainId);
- return children;
+ useReloadOnChainChanged();
+ return !isSupported ? : children;
}
ChainChangeWatcher.propTypes = {
diff --git a/src/components/account-status.js b/src/components/account-status.js
index bc85eea..a9bf398 100644
--- a/src/components/account-status.js
+++ b/src/components/account-status.js
@@ -14,6 +14,8 @@ export default function AccountStatus() {
account: drizzleState.accounts[0],
}));
+ if (account === VIEW_ONLY_ADDRESS) return <>>;
+
return (
{
- return { hasError: true };
- };
componentDidCatch(error, errorInfo) {
withScope((scope) => {
Object.keys(errorInfo).forEach((key) => {