Skip to content

Commit 7d42f96

Browse files
committed
chore(web): update voteID subgraph variable name to voteIDNum
1 parent d15b62d commit 7d42f96

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

web/src/hooks/queries/useDrawQuery.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ export type { DrawQuery };
77
const drawQuery = graphql(`
88
query Draw($address: String, $disputeID: String, $roundID: String) {
99
draws(where: { dispute: $disputeID, juror: $address, round: $roundID }) {
10-
voteID
10+
voteIDNum
1111
}
1212
}
1313
`);
1414

1515
export const useDrawQuery = (address?: string | null, disputeID?: string, roundID?: string) => {
1616
const isEnabled = !!(address && disputeID && roundID);
17-
return useQuery({
17+
return useQuery<DrawQuery>({
1818
queryKey: [`drawQuery${[address, disputeID, roundID]}`],
1919
enabled: isEnabled,
2020
queryFn: async () => await graphqlQueryFnHelper(drawQuery, { address, disputeID, roundID }),

web/src/pages/Cases/CaseDetails/Voting/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const Voting: React.FC<IVoting> = ({ arbitrable, currentPeriodIndex }) => {
4848
const { data: appealCost } = useAppealCost(id);
4949
const { data: drawData } = useDrawQuery(address?.toLowerCase(), id, disputeData?.dispute?.currentRound.id);
5050
const roundId = disputeData?.dispute?.currentRoundIndex;
51-
const voteId = drawData?.draws?.[0]?.voteID;
51+
const voteId = drawData?.draws?.[0]?.voteIDNum;
5252
const { data: voted } = useDisputeKitClassicIsVoteActive({
5353
enabled: !isUndefined(roundId) && !isUndefined(voteId),
5454
args: [BigInt(id ?? 0), roundId, voteId],
@@ -101,7 +101,11 @@ const Voting: React.FC<IVoting> = ({ arbitrable, currentPeriodIndex }) => {
101101
!voted ? (
102102
<>
103103
<VotingHistory {...{ arbitrable }} isQuestion={false} />
104-
<Classic {...{ arbitrable }} setIsOpen={setIsPopupOpen} voteIDs={drawData.draws.map((draw) => draw.voteID)} />
104+
<Classic
105+
{...{ arbitrable }}
106+
setIsOpen={setIsPopupOpen}
107+
voteIDs={drawData.draws.map((draw) => draw.voteIDNum)}
108+
/>
105109
</>
106110
) : (
107111
<VotingHistory {...{ arbitrable }} isQuestion={true} />

0 commit comments

Comments
 (0)