Skip to content

Commit

Permalink
Merge 7124377 into f29a6db
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig committed Jun 17, 2024
2 parents f29a6db + 7124377 commit 01da9f1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/validator/src/services/indices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ export class IndicesService {
return this.pollValidatorIndicesPromise;
}

this.pollValidatorIndicesPromise = this.pollValidatorIndicesInternal(pubkeysHex);
// Once the pollValidatorIndicesInternal() resolves or rejects null the cached promise so it can be called again.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.pollValidatorIndicesPromise.finally(() => {
this.pollValidatorIndicesPromise = this.pollValidatorIndicesInternal(pubkeysHex).finally(() => {
// Once the pollValidatorIndicesInternal() resolves or rejects null the cached promise so it can be called again.
this.pollValidatorIndicesPromise = null;
});
return this.pollValidatorIndicesPromise;
Expand Down

0 comments on commit 01da9f1

Please sign in to comment.