Skip to content

Commit

Permalink
fix(cleanup): code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbeckers committed Oct 3, 2023
1 parent ae24fb1 commit 9ff2e25
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/components/JarCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ export const JarCard = ({ record }: { record: CookieJar }) => {
const { isMember } = useCookieJar({ cookieJarId: record.jarUid });
const [balance, setBalance] = useState<string>("Loading");

console.log("Rendering JarCard: ", record);

useEffect(() => {
const getBalance = async () => {
const _balance = await publicClient?.getBalance({
Expand Down
5 changes: 2 additions & 3 deletions src/hooks/useIndexer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ import { useEffect, useState } from "react";
import { useTargets } from "./useTargets";
import CookieJarIndexer from "../utils/indexer/CookieJarIndexer";
import { parseAbiItem } from "abitype";
import { useLiveQuery } from "dexie-react-hooks";
import { useDHConnect } from "@daohaus/connect";
import { db } from "../utils/indexer";

const useIndexer = () => {
const [indexer, setIndexer] = useState<CookieJarIndexer | undefined>();
const [indexer, setIndexer] = useState<CookieJarIndexer>();
const addresses = useTargets();
const { publicClient, chainId } = useDHConnect();

Expand Down Expand Up @@ -50,7 +49,7 @@ const useIndexer = () => {
);
}
}
}, [addresses, indexer, publicClient]);
}, [addresses, indexer]);

return {
indexer,
Expand Down
3 changes: 1 addition & 2 deletions src/utils/indexer/CookieJarIndexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ class CookieJarIndexer implements CookieJarIndexerInterface {
.where({ chainId })
.toArray();

console.log(subscriptions);

//TODO something cleaner than massice try-catch
try {
// Get cookie jars and claim events
await Promise.all(
Expand Down

0 comments on commit 9ff2e25

Please sign in to comment.