Skip to content

Commit

Permalink
fix: land on mainnet when no network is set (#1419)
Browse files Browse the repository at this point in the history
* fix: land on mainnet when no network is set

* fix: remove fallback to first element on array

* fix: bring back fallback to first element on array
  • Loading branch information
VmMad authored Apr 22, 2024
1 parent 379b0f6 commit 83f1361
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const App: React.FC<RouteComponentProps<AppRouteProps>> = ({

useEffect(() => {
if (networksLoaded && !network) {
network = networks.length > 0 ? networks[0].network : MAINNET;
network = networks.find((n) => n.network === MAINNET)?.network ?? networks[0]?.network ?? MAINNET;
history.replace(`/${network}`);
}
}, [networksLoaded]);
Expand Down

0 comments on commit 83f1361

Please sign in to comment.