Skip to content

Commit

Permalink
refactor(dw): use network uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
javadkh2 committed Oct 10, 2024
1 parent fd09cef commit 12cfbc4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,13 @@ export const WalletProvider: FC<PropsWithChildren> = ({ 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);
Expand Down

0 comments on commit 12cfbc4

Please sign in to comment.