Skip to content

Commit

Permalink
chore: fix package-lock
Browse files Browse the repository at this point in the history
  • Loading branch information
baktun14 committed Oct 7, 2024
1 parent 19ebf6a commit f8cea7f
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,13 @@ import { useChain } from "@cosmos-kit/react";
import { akash, akashSandbox, akashTestnet, assetLists } from "@src/chains";
import networkStore from "@src/store/networkStore";
import { customRegistry } from "@src/utils/customRegistry";
import { useEffect, useState } from "react";
import { CosmosMetamaskExtensionWallet } from "@cosmos-kit/cosmos-extension-metamask";
import { wallets as metamask } from "@cosmos-kit/cosmos-extension-metamask";

type Props = {
children: React.ReactNode;
};

export function CustomChainProvider({ children }: Props) {
const [metamask, setMetamask] = useState<CosmosMetamaskExtensionWallet[]>([]);

useEffect(() => {
import("@cosmos-kit/cosmos-extension-metamask").then(module => {
setMetamask(module.wallets);
});
}, []);

if (!metamask.length) {
return null;
}

return (
<ChainProvider
chains={[akash, akashSandbox, akashTestnet]}
Expand Down
145 changes: 145 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f8cea7f

Please sign in to comment.