Skip to content

Commit 63dd03c

Browse files
committed
Fix: Kapi method
1 parent 05cdac7 commit 63dd03c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/withdrawal/fetchValidatorsData.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ async function validateKapiJsonResponse(kapiJsonResponse) {
5050

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

5757
// This function fetches validators data from the KAPI

tests/fetchValidatorsData.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('buildKapiUrl', () => {
1010
const operatorId = '999999';
1111
const percentage = 55;
1212

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

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

0 commit comments

Comments
 (0)