Skip to content

Commit

Permalink
fix(src/services): fix detection of scheme removal proposal for Schem…
Browse files Browse the repository at this point in the history
…Registrar
  • Loading branch information
AugustoL committed May 30, 2022
1 parent 3b43392 commit 8348aa0
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/services/CacheService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1223,13 +1223,18 @@ export default class UtilsService {
);
const fromBlock = networkCache.blockNumber + 1;

let schemeEvents = await getRawEvents(
web3,
schemeAddress,
fromBlock,
toBlock,
schemeTypeData.newProposalTopics
);
let schemeEvents = [];
for (let i = 0; i < schemeTypeData.newProposalTopics.length; i++) {
schemeEvents = schemeEvents.concat(
await getRawEvents(
web3,
schemeAddress,
fromBlock,
toBlock,
schemeTypeData.newProposalTopics[i]
)
);
}

await batchPromisesOntarget(
schemeEvents.map(schemeEvent => {
Expand Down

0 comments on commit 8348aa0

Please sign in to comment.