diff --git a/packages/validator/src/services/indices.ts b/packages/validator/src/services/indices.ts index dcc129cc591e..c6ef40b473e5 100644 --- a/packages/validator/src/services/indices.ts +++ b/packages/validator/src/services/indices.ts @@ -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;