Skip to content

Commit

Permalink
Merge pull request #902 from AugustoL/fix/scheme-registrar
Browse files Browse the repository at this point in the history
Fix detection of scheme removal proposal for SchemeRegistrar
  • Loading branch information
AugustoL authored May 30, 2022
2 parents 5c28989 + 8348aa0 commit 631f157
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 631f157

Please sign in to comment.