Skip to content

Commit

Permalink
debt: mater controller
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielPrediger committed Jul 17, 2024
1 parent cb43cfb commit 3047ff6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/pages/SwitchNetwork/NetworkList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { INetwork } from '@pollum-io/sysweb3-network';

import { Button } from 'components/Button';
import { useUtils } from 'hooks/useUtils';
import store, { RootState } from 'state/store';
import { setOpenDAppErrorModal } from 'state/vault';
import { RootState } from 'state/store';
import { getController } from 'utils/browser';
import { getChainIdPriority } from 'utils/chainIdPriority';
import { getNetworkChain } from 'utils/network';
Expand Down Expand Up @@ -53,7 +52,7 @@ export const NetworkList = ({ isChanging }: { isChanging: boolean }) => {

const handleChangeNetwork = async (network: INetwork, chain: string) => {
try {
store.dispatch(setOpenDAppErrorModal(false));
wallet.setOpenDAppErrorModalState(false);
await wallet.setActiveNetwork(network, chain);
if (isDappAskingToChangeNetwork) window.close();
navigate('/home');
Expand Down

0 comments on commit 3047ff6

Please sign in to comment.