Skip to content

Commit

Permalink
Change vote query size to 1k and show download button if proposal is …
Browse files Browse the repository at this point in the history
…closed (snapshot-labs#3364)
  • Loading branch information
ChaituVR authored Nov 29, 2022
1 parent 4541f9b commit ac6dae7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/SpaceProposalVotesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const { downloadVotes, isDownloadingVotes } = useReportDownload();
:loading="!loaded"
slim
>
<template #button>
<template v-if="props.proposal.state === 'closed'" #button>
<BaseButtonIcon>
<LoadingSpinner v-if="isDownloadingVotes" />
<i-ho-download
Expand Down
2 changes: 1 addition & 1 deletion src/composables/useReportDownload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function useReportDownload() {
async function getAllVotes(proposalId: string) {
let votes: Vote[] = [];
let page = 0;
const pageSize = 10000;
const pageSize = 1000;
while (votes.length === pageSize * page) {
const newVotes = await getProposalVotes(proposalId, {
first: pageSize,
Expand Down

0 comments on commit ac6dae7

Please sign in to comment.