From 63dd03c7aadd6876ba6bd903afb5027185beba38 Mon Sep 17 00:00:00 2001 From: Anto Date: Fri, 31 Mar 2023 21:13:19 +0200 Subject: [PATCH] Fix: Kapi method --- src/withdrawal/fetchValidatorsData.js | 4 ++-- tests/fetchValidatorsData.test.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/withdrawal/fetchValidatorsData.js b/src/withdrawal/fetchValidatorsData.js index e03d520..021a445 100644 --- a/src/withdrawal/fetchValidatorsData.js +++ b/src/withdrawal/fetchValidatorsData.js @@ -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 diff --git a/tests/fetchValidatorsData.test.js b/tests/fetchValidatorsData.test.js index ab9cbcc..65b2882 100644 --- a/tests/fetchValidatorsData.test.js +++ b/tests/fetchValidatorsData.test.js @@ -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);