From cf7500ddc3b1fd0f8f714df78e562d454b454c54 Mon Sep 17 00:00:00 2001 From: Zeeshan Abid Date: Mon, 5 Aug 2024 16:32:21 +0100 Subject: [PATCH 1/2] fix: updated endpoints for hpos-api-rust --- src/interfaces/HposInterface.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/interfaces/HposInterface.ts b/src/interfaces/HposInterface.ts index 495ef3d..94c3edc 100644 --- a/src/interfaces/HposInterface.ts +++ b/src/interfaces/HposInterface.ts @@ -849,6 +849,7 @@ export function useHposInterface(): HposInterface { try { return await hposHolochainCall({ method: 'get', + pathPrefix: '/api/v2', path: '/host/redemptions' }) } catch (error) { @@ -959,7 +960,7 @@ export function useHposInterface(): HposInterface { const result = await hposHolochainCall({ method: 'get', pathPrefix: '/api/v2', - path: '/holofuel_redeemable_for_last_week' + path: '/host/redeemable_histogram' }) return result From 9b0d855eb2a4905e86968ebfab10355da1bfeecd Mon Sep 17 00:00:00 2001 From: Zeeshan Abid Date: Mon, 5 Aug 2024 17:41:30 +0100 Subject: [PATCH 2/2] fix: updated other endpoints to use v2 --- src/interfaces/HposInterface.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/interfaces/HposInterface.ts b/src/interfaces/HposInterface.ts index 94c3edc..5049397 100644 --- a/src/interfaces/HposInterface.ts +++ b/src/interfaces/HposInterface.ts @@ -825,6 +825,7 @@ export function useHposInterface(): HposInterface { try { return await hposHolochainCall({ method: 'get', + pathPrefix: '/api/v2', path: '/host/invoices', params: { invoice_set: 'paid' } }) @@ -837,6 +838,7 @@ export function useHposInterface(): HposInterface { try { return await hposHolochainCall({ method: 'get', + pathPrefix: '/api/v2', path: '/host/invoices', params: { invoice_set: 'unpaid' } }) @@ -863,6 +865,7 @@ export function useHposInterface(): HposInterface { // @ts-ignore const { version: coreAppVersion } = await hposHolochainCall({ method: 'get', + pathPrefix: '/api/v2', path: '/apps/core/version' }) @@ -885,6 +888,7 @@ export function useHposInterface(): HposInterface { // @ts-ignore const data = await hposHolochainCall({ method: 'get', + pathPrefix: '/api/v2', path: '/host/kyc_level' })