diff --git a/src/app/(sidebar)/endpoints/components/SavedEndpointsPage.tsx b/src/app/(sidebar)/endpoints/components/SavedEndpointsPage.tsx index 43d71aea..4fad01ab 100644 --- a/src/app/(sidebar)/endpoints/components/SavedEndpointsPage.tsx +++ b/src/app/(sidebar)/endpoints/components/SavedEndpointsPage.tsx @@ -55,9 +55,16 @@ export const SavedEndpointsPage = () => { >(); useEffect(() => { - setSavedEndpointsHorizon(localStorageSavedEndpointsHorizon.get()); - setSavedRpcMethods(localStorageSavedRpcMethods.get()); - }, []); + const horizonItems = localStorageSavedEndpointsHorizon + .get() + .filter((h) => h.network.id === network.id); + const rpcItems = localStorageSavedRpcMethods + .get() + .filter((r) => r.network.id === network.id); + + setSavedEndpointsHorizon(horizonItems); + setSavedRpcMethods(rpcItems); + }, [network.id]); useEffect(() => { const mappedRpcIndex = savedRpcMethods.reduce(