Skip to content

Commit

Permalink
new core instance
Browse files Browse the repository at this point in the history
  • Loading branch information
codingki committed Dec 21, 2024
1 parent 3487c7a commit 983b914
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/widget/src/providers/CosmosProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { onlyTestnetsAtom } from "@/state/skipClient";
import { walletConnectAtom } from "@/state/wallets";
import { GrazProvider } from "graz";
import { useAtomValue } from "jotai";
import { Core } from "@walletconnect/core";

type CosmosProviderProps = {
children: React.ReactNode;
Expand All @@ -13,6 +14,9 @@ export const CosmosProvider: React.FC<CosmosProviderProps> = ({
}) => {
const isTestnet = useAtomValue(onlyTestnetsAtom);
const walletConnect = useAtomValue(walletConnectAtom);
const core = new Core({
projectId: walletConnect.options?.projectId
})
return (
<GrazProvider grazOptions={{
chains: isTestnet ? testnetChains : mainnetChains,
Expand All @@ -25,7 +29,8 @@ export const CosmosProvider: React.FC<CosmosProviderProps> = ({
walletConnect: {
options: {
projectId: walletConnect.options?.projectId,
name: walletConnect.options?.name
name: walletConnect.options?.name,
core,
},
walletConnectModal: walletConnect?.walletConnectModal
},
Expand Down

0 comments on commit 983b914

Please sign in to comment.