From 483f6f413113a0f1cd6b304b145b8a9e190e903e Mon Sep 17 00:00:00 2001 From: Anna Mukharram Date: Mon, 25 Dec 2023 12:59:20 +0400 Subject: [PATCH] fix: remov --- .../staking-router-storage.service.ts | 54 ------------------- 1 file changed, 54 deletions(-) delete mode 100644 src/staking-router/staking-router-storage.service.ts diff --git a/src/staking-router/staking-router-storage.service.ts b/src/staking-router/staking-router-storage.service.ts deleted file mode 100644 index efd83281..00000000 --- a/src/staking-router/staking-router-storage.service.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Injectable, LoggerService, Inject } from '@nestjs/common'; -import { WINSTON_MODULE_NEST_PROVIDER } from 'nest-winston'; -import { Configuration } from 'common/config'; -import { KeysApiService } from 'keys-api/keys-api.service'; -import { StakingModuleData } from 'guardian'; -import { getVettedUnusedKeys } from './vetted-keys'; -import { RegistryOperator } from 'keys-api/interfaces/RegistryOperator'; -import { RegistryKey } from 'keys-api/interfaces/RegistryKey'; -import { SRModule } from 'keys-api/interfaces'; -import { Meta } from 'keys-api/interfaces/Meta'; -import { InconsistentLastChangedBlockHash } from 'common/custom-errors'; -import { SROperatorListWithModule } from 'keys-api/interfaces/SROperatorListWithModule'; -import { ELBlockSnapshot } from 'keys-api/interfaces/ELBlockSnapshot'; - -type UpdatedData = { - operatosByModules: SROperatorListWithModule; - unusedKeys: - meta: Meta; - -} - -@Injectable() -export class StakingRouterService { - constructor( - @Inject(WINSTON_MODULE_NEST_PROVIDER) protected logger: LoggerService, - protected readonly config: Configuration, - protected readonly keysApiService: KeysApiService, - ) {} - - protected stakingRouterCache: Record = {}; - - - async fetchData() { - // fetch operators and modules - const { data: operatorsByModules, meta } = - await this.keysApiService.getOperatorListWithModule(); - - const result = operatorsByModules.filter(({ module: stakingModule }) => { - const cacheLastChangedBlockHash = - this.stakingRouterCache[stakingModule.id].lastChangedBlockHash; - - return cacheLastChangedBlockHash !== stakingModule.lastChangedBlockHash - ? true - : false; - }); - - } - - async fetchOperatorsAndModules() { - - } - - -} \ No newline at end of file