{maybeMeta.match({
None: () => (
diff --git a/src/index.ts b/src/index.ts
index 96369ca3..76c58fa6 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -2,4 +2,4 @@ export { AddressActivityListView } from "./components/Organisms/TokenBalances/Ad
export { TokenBalancesListView } from "./components/Organisms/TokenBalances/TokenBalancesListView/TokenBalancesListView";
export { TokenTransfersListView } from "./components/Organisms/TokenBalances/TokenTransfersListView/TokenTransfersListView";
export { NFTWalletTokenListView } from "./components/Organisms/NFTs/NFTWalletTokenListView/NFTWalletTokenListView";
-export { GoldRushProvider } from "./utils/store/Goldrush";
+export { CovalentProvider as GoldRushProvider } from "./utils/store/Covalent";
diff --git a/src/utils/store/Chains.tsx b/src/utils/store/Chains.tsx
new file mode 100644
index 00000000..ea03cd31
--- /dev/null
+++ b/src/utils/store/Chains.tsx
@@ -0,0 +1,40 @@
+import type { ReactNode } from "react";
+import { createContext, useContext, useEffect, useState } from "react";
+import { useCovalent } from "./Covalent";
+import { type ChainItem } from "@covalenthq/client-sdk";
+
+interface ChainsType {
+ chains: ChainItem[] | null;
+}
+
+interface ChainsProviderProps {
+ children: ReactNode;
+}
+
+const ChainsContext = createContext({} as ChainsType);
+
+export const ChainsProvider: React.FC = ({ children }) => {
+ const { covalentClient } = useCovalent();
+
+ const [chains, setChains] = useState(null);
+
+ useEffect(() => {
+ (async () => {
+ try {
+ const allChainsResp =
+ await covalentClient.BaseService.getAllChains();
+ setChains(allChainsResp.data.items);
+ } catch (error) {
+ console.error(error);
+ }
+ })();
+ }, []);
+
+ return (
+
+ {children}
+
+ );
+};
+
+export const useChains = () => useContext(ChainsContext);
diff --git a/src/utils/store/Covalent.tsx b/src/utils/store/Covalent.tsx
new file mode 100644
index 00000000..33e0ab9e
--- /dev/null
+++ b/src/utils/store/Covalent.tsx
@@ -0,0 +1,35 @@
+import { createContext, useContext, useMemo } from "react";
+import { CovalentClient } from "@covalenthq/client-sdk";
+import { Toaster } from "@/components/ui/toaster";
+
+interface CovalentContextType {
+ covalentClient: CovalentClient;
+}
+
+interface CovalentProviderProps {
+ children: React.ReactNode;
+ apikey: string;
+}
+
+const CovalentContext = createContext(
+ {} as CovalentContextType
+);
+
+export const CovalentProvider: React.FC = ({
+ children,
+ apikey,
+}) => {
+ const covalentClient = useMemo(
+ () => new CovalentClient(apikey),
+ [apikey]
+ );
+
+ return (
+
+ {children}
+
+
+ );
+};
+
+export const useCovalent = () => useContext(CovalentContext);
diff --git a/src/utils/store/Goldrush.tsx b/src/utils/store/Goldrush.tsx
deleted file mode 100644
index 8a2ecd47..00000000
--- a/src/utils/store/Goldrush.tsx
+++ /dev/null
@@ -1,158 +0,0 @@
-import type { ReactNode } from "react";
-import { createContext, useContext, useMemo } from "react";
-import { updateTheme } from "../functions";
-import { CovalentClient } from "@covalenthq/client-sdk";
-import { Toaster } from "@/components/ui/toaster";
-
-interface GoldrushContextType {
- covalentClient: CovalentClient;
-}
-
-interface GoldRushProviderProps {
- children: ReactNode;
- apikey: string;
- mode?: "dark" | "light";
- theme?: "classic" | "neo";
- border_radius?: "none" | "small" | "medium" | "large" | "full";
- color?:
- | "slate"
- | "stone"
- | "red"
- | "orange"
- | "amber"
- | "yellow"
- | "lime"
- | "green"
- | "emerald"
- | "cyan"
- | "sky"
- | "blue"
- | "indigo"
- | "violet"
- | "purple"
- | "fuchsia"
- | "pink"
- | "rose";
-}
-
-const GoldRushContext = createContext(
- {} as GoldrushContextType
-);
-
-export const GoldRushProvider: React.FC = ({
- children,
- apikey,
- mode = "light",
- theme = "classic",
- color = "slate",
- border_radius = "medium",
-}) => {
- const covalentClient = useMemo(
- () => new CovalentClient(apikey),
- [apikey]
- );
-
- function changeOnlyColor(accentcolor: string, border_radius: string) {
- if (typeof document !== "undefined") {
- const theme = {
- accentcolor: accentcolor,
- borderradius: border_radius,
- };
- updateTheme(theme);
- }
- }
-
- function changeMode(mode: "dark" | "light") {
- if (typeof document !== "undefined") {
- const body = document.body;
- const root = document.documentElement;
-
- if (mode === "dark") {
- body.classList.add("dark");
- root.classList.add("dark");
- return;
- }
- body.classList.remove("dark");
- root.classList.remove("dark");
- }
- }
-
- function changeToNeo() {
- if (typeof document !== "undefined") {
- const theme = {
- backgroundColor: {
- light: "#eff6ff",
- dark: "#1d4ed8",
- },
- borderColor: {
- light: "#bfdbfe",
- dark: "#1e40af",
- },
- secondary: {
- light: "#64748b",
- },
- surfaceColor: {
- light: "#bfdbfe",
- dark: "#bfdbfe",
- },
- secondaryColor: {
- light: "#64748b",
- dark: "#64748b",
- },
- };
- updateTheme(theme);
- const body = document.body;
- body.classList.add("neo");
- }
- }
-
- function changeToClassic() {
- if (typeof document !== "undefined") {
- const theme = {
- backgroundColor: {
- light: "#ffffff",
- dark: "#030711",
- },
- borderColor: {
- light: "#e5e7eb",
- dark: "#1f2937",
- },
- surfaceColor: {
- light: "#e5e7eb",
- dark: "#e5e7eb",
- },
- secondaryColor: {
- light: "#94a3b8",
- dark: "#94a3b8",
- },
- };
- updateTheme(theme);
- const body = document.body;
- body.classList.remove("neo");
- }
- }
- if (typeof document !== "undefined") {
- changeOnlyColor(color, border_radius);
- changeMode(mode);
- switch (theme) {
- case "classic":
- changeToClassic();
- break;
- case "neo":
- changeToNeo();
- break;
- default:
- changeToClassic();
- break;
- }
- }
-
- return (
-
- {children}
-
-
- );
-};
-
-export const useGoldrush = () => useContext(GoldRushContext);