Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
hostgsr authored Apr 8, 2024
1 parent 0981057 commit 8861067
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 55 deletions.
5 changes: 5 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
11 changes: 0 additions & 11 deletions src/app/context/web3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import abi from './abi';
import abiNFT from './abiNFT'
import chains from './config';
import { CreateBountyFunction,withdrawFromOpenBountyFunction ,SubmitClaimForVoteFunction, GetParticipants, CreateClaimFunction, AcceptClaimFunction, CancelBountyFunction, FetchBountiesFunction, FetchBountyByIdFunction, GetBountiesByUserFunction, Bounty , GetClaimsByUserFunction, GetClaimsByBountyIdFunction, GetURIFunction, Claim, GetAllBountiesFunction, JoinOpenBountyFunction, BountyCurrentVotingClaimFunction, BountyVotingTrackerFunction, VoteClaimFunction, ResolveVoteFunction } from '../../types/web3';
import { MotionValue } from "framer-motion";


const currentChain = chains.sepolia;
Expand Down Expand Up @@ -121,7 +120,6 @@ export const submitClaimForVote: SubmitClaimForVoteFunction = async (
};



export const cancelOpenBounty: CancelBountyFunction = async (
primaryWallet, id
) => {
Expand All @@ -148,7 +146,6 @@ export const cancelSoloBounty: CancelBountyFunction = async (
}
};


export const withdrawFromOpenBounty: withdrawFromOpenBountyFunction = async (
primaryWallet, id
) => {
Expand Down Expand Up @@ -189,10 +186,6 @@ export const resolveVote: ResolveVoteFunction = async (
};






export const joinOpenBounty: JoinOpenBountyFunction = async (
primaryWallet,
id,
Expand All @@ -214,7 +207,6 @@ export const joinOpenBounty: JoinOpenBountyFunction = async (




// READ Functions


Expand Down Expand Up @@ -358,7 +350,6 @@ export const getParticipants: GetParticipants = async (id) => {
};



export const bountyCurrentVotingClaim: BountyCurrentVotingClaimFunction = async (id) => {
const contractRead = await getContractRead();
const currentVotingClaim = await contractRead.bountyCurrentVotingClaim(id);
Expand All @@ -378,8 +369,6 @@ export const bountyVotingTracker: BountyVotingTrackerFunction = async (id) => {
};




export const getClaimsByUser: GetClaimsByUserFunction = async (user) => {
const contractRead = await getContractRead();
const claimsRaw = await contractRead.getClaimsByUser(user);
Expand Down
24 changes: 1 addition & 23 deletions src/components/account/AccountInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,9 @@ import {
import { getSigner, getContract, getBountiesByUser, getProvider, getClaimsByUser } from '@/app/context/web3';
import Button from '@/components/ui/Button';
import BountyList from '@/components/ui/BountyList';
import { BountiesData, ClaimsData } from '@/types/web3';


interface BountiesData {
id: string;
issuer: string;
name: string;
description: string;
value: string;
claimer: string;
createdAt: string;
claimId: string;
}



interface ClaimsData {
accepted: boolean;
bountyId: string;
bountyIssuer: string;
createdAt: string;
description: string;
id: string;
issuer: string;
name: string;
}



Expand Down
14 changes: 3 additions & 11 deletions src/components/bounty/NoProof.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
import React, { useEffect, useState } from 'react';
import { useDynamicContext } from '@dynamic-labs/sdk-react-core';
import { cancelSoloBounty, fetchBountyById, } from '@/app/context/web3';
import { Bounty } from '@/types/web3';


interface BountyData {
id: string;
issuer: string;
name: string;
description: string;
amount: string;
claimer: string;
createdAt: string;
claimId: string;
}

const NoProof = ({ bountyId }: { bountyId: string }) => {
const { primaryWallet } = useDynamicContext();
const [bountyData, setBountyData] = useState<BountyData | null>(null);
const [bountyData, setBountyData] = useState<Bounty | null>(null);

const [youOwner, setYouOwner] = useState<boolean | null>(null);
const [bountyCanceled, setBountyCanceled] = useState<boolean | null>(null);
Expand Down
10 changes: 0 additions & 10 deletions src/components/bounty/Voting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,6 @@ const Voting: React.FC<VotingProps> = ({ bountyId }) => {
}










console.log(bountyId)

return (
<div>
{votingData ? (
Expand Down
2 changes: 2 additions & 0 deletions src/components/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ const Header = () => {
<Link href="/">
<Logo/>
</Link>
<div className='hidden lg:block'>
<Menu menuPoints={['about us', 'how it works']} />
</div>
<div className='flex flex-col '>


Expand Down
13 changes: 13 additions & 0 deletions src/types/web3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ export interface BountiesData {
}



export interface ClaimsData {
accepted: boolean;
bountyId: string;
bountyIssuer: string;
createdAt: bigint;
description: string;
id: string;
issuer: string;
name: string;
}


export interface BountyListProps {
bountiesData: BountiesData[];
}
Expand Down

0 comments on commit 8861067

Please sign in to comment.