diff --git a/mock-hpos-api/defaultResponse.js b/mock-hpos-api/defaultResponse.js index cf60b0e..f90dd7e 100644 --- a/mock-hpos-api/defaultResponse.js +++ b/mock-hpos-api/defaultResponse.js @@ -652,7 +652,7 @@ const data = { '/api/v2/apps/core/version': coreAppVersion, '/api/v2/host/invoices': mockPaidInvoicesData, '/api/v2/host/redemptions': mockRedemptionHistoryData, - '/api/v2/host/kyc': mockKycData.kyc + '/api/v2/host/kyc_level': mockKycData.kyc }, put: { '/api/v1/config': (args) => args, diff --git a/src/interfaces/HposInterface.ts b/src/interfaces/HposInterface.ts index 5a4929b..a1643ce 100644 --- a/src/interfaces/HposInterface.ts +++ b/src/interfaces/HposInterface.ts @@ -110,9 +110,7 @@ interface HoloFuelProfileResponse { avatar_url: string } -interface CoreAppVersionResponse { - version: string -} +type CoreAppVersionResponse = string | null export interface HostPreferencesResponse { price_compute: string @@ -860,7 +858,7 @@ export function useHposInterface(): HposInterface { try { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - const { version: coreAppVersion } = await hposHolochainCall({ + const coreAppVersion = await hposHolochainCall({ method: 'get', path: '/apps/core/version' }) @@ -884,7 +882,7 @@ export function useHposInterface(): HposInterface { // @ts-ignore const data = await hposHolochainCall({ method: 'get', - path: '/host/kyc' + path: '/host/kyc_level' }) if (isKycLevel(data)) {