Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 23 additions & 19 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import Settings from "providers/Settings";
import useChainParams from "hooks/useChainParams";
import ErrorPage from "pages/Error";
import { BuildInfo } from "components/shared/BuildInfo";
import LoadingPage from "pages/Loading";

/**
* Shim component that checks if the App is ready
Expand Down Expand Up @@ -72,7 +73,7 @@ function AppReadyShim({ children }) {
chain?.unsupported,
isDisconnected,
isGeneralRoute,
JSON.stringify(chain)
JSON.stringify(chain),
]);

return <>{children}</>;
Expand Down Expand Up @@ -124,24 +125,27 @@ export default function App() {
<ModalManager>
<AppReadyShim>
<Header />

<Grid style={{ display: "flex", flexGrow: 1 }}>
<Grid.Row style={{ width: "100%", margin: 0 }}>
<Grid.Col>
{appReady ? (
<>
<ErrorBoundary FallbackComponent={ErrorPage}>
<Layout.Columned>
<Routes />
</Layout.Columned>
</ErrorBoundary>
</>
) : (
<ConnectPage />
)}
</Grid.Col>
</Grid.Row>
</Grid>
{isVersionSupported(version, chain.id) ? (
<Grid style={{ display: "flex", flexGrow: 1 }}>
<Grid.Row style={{ width: "100%", margin: 0 }}>
<Grid.Col>
{appReady ? (
<>
<ErrorBoundary FallbackComponent={ErrorPage}>
<Layout.Columned>
<Routes />
</Layout.Columned>
</ErrorBoundary>
</>
) : (
<ConnectPage />
)}
</Grid.Col>
</Grid.Row>
</Grid>
) : (
<LoadingPage />
)}
</AppReadyShim>
</ModalManager>
</VoucheesData>
Expand Down
2 changes: 1 addition & 1 deletion src/providers/Version.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const versionSupport = {
};

export function isVersionSupported(version, chainId) {
return versionSupport[version].includes(chainId);
return versionSupport[version]?.includes(chainId);
}

export function getVersion(chainId) {
Expand Down