Skip to content

Commit

Permalink
chore: wind down asset logo prefetching
Browse files Browse the repository at this point in the history
  • Loading branch information
grikomsn committed Jan 17, 2024
1 parent 63dd875 commit 1bf5b9f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/context/assets.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Asset } from "@skip-router/core";
import {
createContext,
FC,
PropsWithChildren,
ReactNode,
useCallback,
useContext,
useEffect,
Expand Down Expand Up @@ -36,7 +35,7 @@ export const AssetsContext = createContext<AssetsContext>({
isReady: false,
});

export const AssetsProvider: FC<PropsWithChildren> = ({ children }) => {
export function AssetsProvider({ children }: { children: ReactNode }) {
const { data: chains } = useChains();
const { data: solveAssets } = useSolveAssets();

Expand Down Expand Up @@ -114,7 +113,7 @@ export const AssetsProvider: FC<PropsWithChildren> = ({ children }) => {
logoURI && load(logoURI);
});
});
}, [assets, chains, isReady]);
}, [isReady]);

return (
<AssetsContext.Provider
Expand All @@ -130,7 +129,7 @@ export const AssetsProvider: FC<PropsWithChildren> = ({ children }) => {
{children}
</AssetsContext.Provider>
);
};
}

export function useAssets() {
return useContext(AssetsContext);
Expand Down

0 comments on commit 1bf5b9f

Please sign in to comment.