We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13ca4b4 commit 5fd025fCopy full SHA for 5fd025f
src/app/features/add-network/use-add-network.tsx
@@ -10,6 +10,7 @@ import {
10
bitcoinNetworkToNetworkMode,
11
networkConfigurationSchema,
12
} from '@leather.io/models';
13
+import { isDefined } from '@leather.io/utils';
14
15
import { RouteUrls } from '@shared/route-urls';
16
import { isValidUrl } from '@shared/utils/validate-url';
@@ -175,7 +176,7 @@ export function useAddNetwork() {
175
176
bitcoinUrl: bitcoinPath,
177
});
178
navigate(RouteUrls.Home);
- } else if (chainId === ChainID.Mainnet || chainId === ChainID.Testnet) {
179
+ } else if (isDefined(chainId)) {
180
removeEditedNetwork();
181
networksActions.addNetwork({
182
id: key as DefaultNetworkConfigurations,
0 commit comments