Skip to content

Commit

Permalink
fix frontend build and clean
Browse files Browse the repository at this point in the history
  • Loading branch information
MSghais committed Aug 4, 2024
1 parent f3fbac9 commit a25bad2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 703 deletions.
11 changes: 8 additions & 3 deletions askeladd-dvm-marketplace/src/app/components/ProgramCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ import { ContractUploadType, IGenerateZKPRequestDVM, JobResultProver, KIND_JOB_R
import { useFetchEvents } from '@/hooks/useFetchEvents';
import { ASKELADD_RELAY } from '@/constants/relay';
import init, { verify_stark_proof, verify_stark_proof_wide_fibo, prove_and_verify, stark_proof_wide_fibo, prove_stark_proof_poseidon, verify_stark_proof_poseidon } from "../../pkg"
import { useNostrContext } from '@/context/NostrContext';
// Define the props for the component
interface TagsCardProps {
event?: NDKEvent | NostrEvent; // Array of array of strings
program?: IGenerateZKPRequestDVM
}
const ProgramCard: React.FC<TagsCardProps> = ({ event, program }) => {
const { fetchEvents, fetchEventsTools, setupSubscriptionNostr } = useFetchEvents()
const { ndk, pool } = useNostrContext()

const [isOpenForm, setIsOpenForm] = useState(false)
const [logSize, setLogSize] = useState<number>(5);
const [claim, setClaim] = useState<number>(443693538);
Expand Down Expand Up @@ -48,12 +51,14 @@ const ProgramCard: React.FC<TagsCardProps> = ({ event, program }) => {
}, []);

useEffect(() => {
const pool = new SimplePool();
runSubscriptionEvent(pool)
// const pool = new SimplePool();
if(pool) {
runSubscriptionEvent(pool)
}
if (!jobId && !jobEventResult) {
timeoutWaitingForJobResult()
}
}, [jobId, jobEventResult])
}, [jobId, jobEventResult, pool])


const runSubscriptionEvent = (pool: SimplePool, pubkey?: string) => {
Expand Down
Loading

0 comments on commit a25bad2

Please sign in to comment.