We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d38455c + 79d7a61 commit 9f95a24Copy full SHA for 9f95a24
src/helpers/proposalStrategiesValue.ts
@@ -57,16 +57,14 @@ async function refreshVpByStrategy(proposals: Proposal[]) {
57
58
export default async function run() {
59
while (true) {
60
- while (true) {
61
- const proposals = await getProposals();
62
-
63
- if (proposals.length === 0) break;
+ const proposals = await getProposals();
64
+ if (proposals.length) {
65
await refreshVpByStrategy(proposals);
66
67
- if (proposals.length < BATCH_SIZE) break;
68
}
69
70
- await snapshot.utils.sleep(REFRESH_INTERVAL);
+ if (proposals.length < BATCH_SIZE) {
+ await snapshot.utils.sleep(REFRESH_INTERVAL);
+ }
71
72
0 commit comments