Skip to content

Commit

Permalink
fix: add network validation
Browse files Browse the repository at this point in the history
  • Loading branch information
alter-eggo committed Jan 30, 2025
1 parent bdde723 commit fadbaa4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/features/add-network/use-add-network.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
bitcoinNetworkToNetworkMode,
networkConfigurationSchema,
} from '@leather.io/models';
import { isDefined } from '@leather.io/utils';

import { RouteUrls } from '@shared/route-urls';
import { isValidUrl } from '@shared/utils/validate-url';
Expand Down Expand Up @@ -175,7 +176,7 @@ export function useAddNetwork() {
bitcoinUrl: bitcoinPath,
});
navigate(RouteUrls.Home);
} else if (chainId === ChainID.Mainnet || chainId === ChainID.Testnet) {
} else if (isDefined(chainId)) {
removeEditedNetwork();
networksActions.addNetwork({
id: key as DefaultNetworkConfigurations,
Expand Down

0 comments on commit fadbaa4

Please sign in to comment.