Skip to content

Commit de2f49f

Browse files
committed
filter custom id from backend request
1 parent 255899a commit de2f49f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/modules/networks/networks-store.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Store } from 'store-unit';
22
import type { ChainId } from '../ethereum/transactions/ChainId';
33
import type { EthereumChainConfig } from '../ethereum/chains/types';
4+
import { isCustomNetworkId } from '../ethereum/chains/helpers';
45
import { Networks } from './Networks';
56
import { getNetworkByChainId, getNetworks } from './networks-api';
67
import type { NetworkConfig } from './NetworkConfig';
@@ -77,7 +78,7 @@ export class NetworksStore extends Store<State> {
7778
const savedIds = savedChainConfigs?.map((config) => config.id);
7879
const chainsToFetch = Array.from(
7980
new Set([...(savedIds || []), ...(chains || [])])
80-
);
81+
).filter((id) => !isCustomNetworkId(id));
8182

8283
const [extraNetworkConfigs, commonNetworkConfigs] =
8384
await Promise.allSettled([getNetworks(chainsToFetch), getNetworks()]);

0 commit comments

Comments
 (0)