Skip to content

Commit 9f95a24

Browse files
authored
Merge branch 'feat-get-proposal-vp-value-from-overlord' into feat-set-vote-vp-value
2 parents d38455c + 79d7a61 commit 9f95a24

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/helpers/proposalStrategiesValue.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,14 @@ async function refreshVpByStrategy(proposals: Proposal[]) {
5757

5858
export default async function run() {
5959
while (true) {
60-
while (true) {
61-
const proposals = await getProposals();
62-
63-
if (proposals.length === 0) break;
60+
const proposals = await getProposals();
6461

62+
if (proposals.length) {
6563
await refreshVpByStrategy(proposals);
66-
67-
if (proposals.length < BATCH_SIZE) break;
6864
}
6965

70-
await snapshot.utils.sleep(REFRESH_INTERVAL);
66+
if (proposals.length < BATCH_SIZE) {
67+
await snapshot.utils.sleep(REFRESH_INTERVAL);
68+
}
7169
}
7270
}

0 commit comments

Comments
 (0)