Skip to content

Commit

Permalink
Merge pull request #170 from lidofinance/fix-naming
Browse files Browse the repository at this point in the history
fix: method name
  • Loading branch information
Amuhar authored Jan 16, 2024
2 parents 2630169 + b84cbea commit 7fe4cd0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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: [
{
Expand Down Expand Up @@ -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: [
{
Expand Down Expand Up @@ -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: [
{
Expand Down
2 changes: 1 addition & 1 deletion src/keys-api/keys-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<KeyListResponse>(`/v1/keys/find`, {
method: 'POST',
headers: {
Expand Down
4 changes: 2 additions & 2 deletions src/staking-router/staking-router.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion test/helpers/mockKeysApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export const mockedKeysWithDuplicates = (
mockedMeta: ELBlockSnapshot,
) => {
jest
.spyOn(keysApiService, 'findKeysEntires')
.spyOn(keysApiService, 'getKeysByPubkeys')
.mockImplementation(async () => ({
data: mockedKeys,
meta: {
Expand Down

0 comments on commit 7fe4cd0

Please sign in to comment.