@@ -1,4 +1,5 @@
1import React from 'react';
1import React from 'react';
2+import { useEffect } from 'react';
2import { hot } from 'react-hot-loader/root';
3import { hot } from 'react-hot-loader/root';
3import { Just, Nothing } from 'folktale/maybe';
4import { Just, Nothing } from 'folktale/maybe';
4import { IndigoApp } from 'indigo-react';
5import { IndigoApp } from 'indigo-react';
@@ -66,6 +67,14 @@ function useInitialRoutes() {
66function Bridge() {
67function Bridge() {
67 const initialRoutes = useInitialRoutes();
68 const initialRoutes = useInitialRoutes();
70+ // full reload if the user changes their selected network in Metamask
73+ window.ethereum.on('chainChanged', () => {
74+ document.location.reload();
70 <WithErrorBoundary render={error => <GlobalErrorBoundary error={error} />}>
79 <WithErrorBoundary render={error => <GlobalErrorBoundary error={error} />}>