Skip to content

Commit

Permalink
Fix: Kapi method
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoTG committed Mar 31, 2023
1 parent 05cdac7 commit 63dd03c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/withdrawal/fetchValidatorsData.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ async function validateKapiJsonResponse(kapiJsonResponse) {

// This function builds the complete KAPI url
async function buildKapiUrl(kapiUrl, moduleId, operatorId, percentage) {
// Note: in the official KAPI, the method "exists_presign" is not available, so we use "validator-exits-to-prepare" method instead for local testing
return `${kapiUrl}/v1/modules/${moduleId}/validators/exists_presign/${operatorId}?percent=${percentage}`;
// Note: in the official KAPI, the method "exits_presign" is not available, so we use "validator-exits-to-prepare" method instead for local testing
return `${kapiUrl}/v1/modules/${moduleId}/validators/exits_presign/${operatorId}?percent=${percentage}`;
}

// This function fetches validators data from the KAPI
Expand Down
2 changes: 1 addition & 1 deletion tests/fetchValidatorsData.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('buildKapiUrl', () => {
const operatorId = '999999';
const percentage = 55;

const expectedUrl = 'http://localhost:3000/v1/modules/1/validators/exists_presign/999999?percent=55';
const expectedUrl = 'http://localhost:3000/v1/modules/1/validators/exits_presign/999999?percent=55';

const result = await buildKapiUrl(kapiUrl, moduleId, operatorId, percentage);

Expand Down

0 comments on commit 63dd03c

Please sign in to comment.