From 9268543383981c5bc5b28a0379a2dcb1d9ae1385 Mon Sep 17 00:00:00 2001 From: Ashutosh Kumar Date: Thu, 7 Nov 2024 00:16:37 +0530 Subject: [PATCH] Fix for Token Deployer --- src/modules/explorer/pages/DAOList/index.tsx | 2 ++ src/services/beacon/hooks/useTezos.ts | 8 ++++++-- src/services/wagmi/context.tsx | 5 +++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/modules/explorer/pages/DAOList/index.tsx b/src/modules/explorer/pages/DAOList/index.tsx index 824b4e96..f007a288 100644 --- a/src/modules/explorer/pages/DAOList/index.tsx +++ b/src/modules/explorer/pages/DAOList/index.tsx @@ -196,6 +196,8 @@ export const DAOList: React.FC = () => { return [] }, [daos, searchText, account]) + console.log({ daos, currentDAOs, myDAOs }) + const filterDAOs = (filter: string) => { setSearchText(filter.trim()) } diff --git a/src/services/beacon/hooks/useTezos.ts b/src/services/beacon/hooks/useTezos.ts index dbe2c113..b632b473 100644 --- a/src/services/beacon/hooks/useTezos.ts +++ b/src/services/beacon/hooks/useTezos.ts @@ -34,7 +34,9 @@ export const useTezos = (): WalletConnectReturn => { isConnected: isEtherlinkConnected, connect: connectWithWagmi, disconnect: disconnectEtherWallet, - network: etherlinkNetwork + network: etherlinkNetwork, + provider: ethProvider, + signer: ethSigner } = useContext(EtherlinkContext) const queryClient = useQueryClient() @@ -209,7 +211,9 @@ export const useTezos = (): WalletConnectReturn => { isEtherlink: network?.startsWith("etherlink"), etherlink: { isConnected: isEtherlinkConnected, - account: ethAccount + account: ethAccount, + provider: ethProvider, + signer: ethSigner } } } diff --git a/src/services/wagmi/context.tsx b/src/services/wagmi/context.tsx index a90571e5..0bc1f890 100644 --- a/src/services/wagmi/context.tsx +++ b/src/services/wagmi/context.tsx @@ -4,6 +4,7 @@ import { disconnect as disconnectEtherlink } from "@wagmi/core" import { config as wagmiConfig } from "services/wagmi/config" import { etherlink, etherlinkTestnet } from "wagmi/chains" import { useSIWE, useModal, SIWESession } from "connectkit" +import { useEthersProvider, useEthersSigner } from "./ethers" interface EtherlinkType { isConnected: boolean @@ -21,6 +22,8 @@ export const EtherlinkContext = createContext(undefined) export const EtherlinkProvider: React.FC<{ children: ReactNode }> = ({ children }) => { const { setOpen } = useModal() + const provider = useEthersProvider() + const signer = useEthersSigner() const { chains, switchChain } = useSwitchChain() // const { data, isReady, isRejected, isLoading, isSignedIn, signOut, signIn, error } = useSIWE({ // onSignIn: (session?: SIWESession) => { @@ -58,6 +61,8 @@ export const EtherlinkProvider: React.FC<{ children: ReactNode }> = ({ children