From d479ec3c515954fdc15b44dfac5216a2c38f247c Mon Sep 17 00:00:00 2001 From: kanshi <46557+kanshi@users.noreply.github.com> Date: Wed, 11 Sep 2024 14:55:52 +0200 Subject: [PATCH] Reduce distribution scope --- src/tasks/tasks.service.ts | 2 +- src/verification/verification.service.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tasks/tasks.service.ts b/src/tasks/tasks.service.ts index 2c43786..ac5825c 100644 --- a/src/tasks/tasks.service.ts +++ b/src/tasks/tasks.service.ts @@ -235,7 +235,7 @@ export class TasksService implements OnApplicationBootstrap { } else this.createServiceState() this.logger.log( - `Bootstrapped Tasks Service [id: ${this.dataId}, isValidating: ${this.state.isValidating}]`, + `Bootstrapped Tasks Service [id: ${this.dataId}, isValidating: ${this.state.isValidating}, isCheckingBalances: ${this.state.isCheckingBalances}]`, ) if (this.doClean != 'true') { diff --git a/src/verification/verification.service.ts b/src/verification/verification.service.ts index ddaa0e2..dc29dc8 100644 --- a/src/verification/verification.service.ts +++ b/src/verification/verification.service.ts @@ -504,7 +504,12 @@ export class VerificationService { .create(verificationData) .catch((error) => this.logger.error(error)) - return verificationData + // We want to filter to ones only verified, as it is assumed by the distribution flow to process only verified relays + const onlyVerifiedRelays = verifiedRelays + .filter((value) => value.result == 'AlreadyVerified') + .map((result) => result.relay) + + return { ...verificationData, relays: onlyVerifiedRelays } } public async getMostRecent(): Promise {