Skip to content

Commit

Permalink
fix: will check every 5s if the user has enough threshold to vote. Wi…
Browse files Browse the repository at this point in the history
…ll also check if the user has voted (#140)
  • Loading branch information
Freshenext authored Aug 27, 2024
1 parent 23424be commit 21c88d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/proposals/hooks/useVotingPowerAtSnapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export const useVotingPowerAtSnapshot = (blockNumber: bigint) => {
},
],
multicallAddress: MULTICALL_ADDRESS,
query: {
refetchInterval: 5000,
},
})

if (isLoading || !data) {
Expand Down
3 changes: 3 additions & 0 deletions src/shared/hooks/useVoteOnProposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ export const useVoteOnProposal = (proposalId: string) => {
...DEFAULT_DAO,
functionName: 'hasVoted',
args: [BigInt(proposalId), address as Address],
query: {
refetchInterval: 5000,
},
})

// If everything passed ok - user can vote
Expand Down

0 comments on commit 21c88d9

Please sign in to comment.