From 12cfbc4dabf1c568601187ffd1d4dd80a426ddac Mon Sep 17 00:00:00 2001 From: Javad Khalilian Date: Thu, 10 Oct 2024 11:00:28 +0200 Subject: [PATCH] refactor(dw): use network uuid --- .../apps/dev-wallet/src/modules/wallet/wallet.provider.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/apps/dev-wallet/src/modules/wallet/wallet.provider.tsx b/packages/apps/dev-wallet/src/modules/wallet/wallet.provider.tsx index b20c2c91d3..08f5bcea42 100644 --- a/packages/apps/dev-wallet/src/modules/wallet/wallet.provider.tsx +++ b/packages/apps/dev-wallet/src/modules/wallet/wallet.provider.tsx @@ -276,12 +276,13 @@ export const WalletProvider: FC = ({ children }) => { }, [retrieveAccounts, contextValue.profile?.uuid]); useEffect(() => { - // filter network if the id is the same but the name is different + // filter network if the id is the same but the uuid is different + // e.g. multiple devnets const filteredNetworks = contextValue.networks.filter((network) => { if (!contextValue.activeNetwork) return true; return ( network.networkId !== contextValue.activeNetwork.networkId || - network.name === contextValue.activeNetwork.name + network.uuid === contextValue.activeNetwork.uuid ); }); const getHostUrl = hostUrlGenerator(filteredNetworks);