From cb0ad2e06081e329ee7d7c26d1cef04babd7d444 Mon Sep 17 00:00:00 2001 From: Anna Mukharram Date: Tue, 16 Jan 2024 13:11:47 +0400 Subject: [PATCH 1/3] fix: method name --- .../staking-module-guard/staking-module-guard.service.ts | 2 +- .../staking-module-guard/staking-module-guard.spec.ts | 8 ++++---- src/keys-api/keys-api.service.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/guardian/staking-module-guard/staking-module-guard.service.ts b/src/guardian/staking-module-guard/staking-module-guard.service.ts index 35117540..a63cfe27 100644 --- a/src/guardian/staking-module-guard/staking-module-guard.service.ts +++ b/src/guardian/staking-module-guard/staking-module-guard.service.ts @@ -260,7 +260,7 @@ export class StakingModuleGuardService { 'Found intersections with lido credentials, need to check used duplicated keys', ); - const { data, meta } = await this.stakingRouterService.findKeysEntires( + const { data, meta } = await this.stakingRouterService.getKeysByPubkeys( depositedPubkeys, ); diff --git a/src/guardian/staking-module-guard/staking-module-guard.spec.ts b/src/guardian/staking-module-guard/staking-module-guard.spec.ts index a4810a19..efc346ec 100644 --- a/src/guardian/staking-module-guard/staking-module-guard.spec.ts +++ b/src/guardian/staking-module-guard/staking-module-guard.spec.ts @@ -1097,7 +1097,7 @@ describe('StakingModuleGuardService', () => { // function that return list from kapi that match keys in parameter const mockSendMessageFromGuardian = jest.spyOn( stakingRouterService, - 'findKeysEntires', + 'getKeysByPubkeys', ); const result = await stakingModuleGuardService.findAlreadyDepositedKeys( @@ -1121,7 +1121,7 @@ describe('StakingModuleGuardService', () => { ]; // function that return list from kapi that match keys in parameter const mockSendMessageFromGuardian = jest - .spyOn(stakingRouterService, 'findKeysEntires') + .spyOn(stakingRouterService, 'getKeysByPubkeys') .mockImplementation(async () => ({ data: [ { @@ -1216,7 +1216,7 @@ describe('StakingModuleGuardService', () => { ]; // function that return list from kapi that match keys in parameter const mockSendMessageFromGuardian = jest - .spyOn(stakingRouterService, 'findKeysEntires') + .spyOn(stakingRouterService, 'getKeysByPubkeys') .mockImplementation(async () => ({ data: [ { @@ -1275,7 +1275,7 @@ describe('StakingModuleGuardService', () => { ]; // function that return list from kapi that match keys in parameter const mockSendMessageFromGuardian = jest - .spyOn(stakingRouterService, 'findKeysEntires') + .spyOn(stakingRouterService, 'getKeysByPubkeys') .mockImplementation(async () => ({ data: [ { diff --git a/src/keys-api/keys-api.service.ts b/src/keys-api/keys-api.service.ts index ae575df5..fde63959 100644 --- a/src/keys-api/keys-api.service.ts +++ b/src/keys-api/keys-api.service.ts @@ -46,7 +46,7 @@ export class KeysApiService { * @param The /v1/keys/find API endpoint returns keys along with their duplicates * @returns */ - public async findKeysEntires(pubkeys: string[]) { + public async getKeysByPubkeys(pubkeys: string[]) { const result = await this.fetch(`/v1/keys/find`, { method: 'POST', headers: { From c044f3b3d2c7469207afbd79b41805830f2987b5 Mon Sep 17 00:00:00 2001 From: Anna Mukharram Date: Tue, 16 Jan 2024 13:16:22 +0400 Subject: [PATCH 2/3] fix: naming --- src/staking-router/staking-router.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/staking-router/staking-router.service.ts b/src/staking-router/staking-router.service.ts index 0bd24d53..6251921e 100644 --- a/src/staking-router/staking-router.service.ts +++ b/src/staking-router/staking-router.service.ts @@ -106,7 +106,7 @@ export class StakingRouterService { }; } - public async findKeysEntires(pubkeys: string[]) { - return await this.keysApiService.findKeysEntires(pubkeys); + public async getKeysByPubkeys(pubkeys: string[]) { + return await this.keysApiService.getKeysByPubkeys(pubkeys); } } From b84cbea07e8ca33218b4da415958204aa7009676 Mon Sep 17 00:00:00 2001 From: Anna Mukharram Date: Tue, 16 Jan 2024 14:41:21 +0400 Subject: [PATCH 3/3] fix: naming in tests --- test/helpers/mockKeysApi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helpers/mockKeysApi.ts b/test/helpers/mockKeysApi.ts index d601e710..13189b84 100644 --- a/test/helpers/mockKeysApi.ts +++ b/test/helpers/mockKeysApi.ts @@ -137,7 +137,7 @@ export const mockedKeysWithDuplicates = ( mockedMeta: ELBlockSnapshot, ) => { jest - .spyOn(keysApiService, 'findKeysEntires') + .spyOn(keysApiService, 'getKeysByPubkeys') .mockImplementation(async () => ({ data: mockedKeys, meta: {