diff --git a/apps/hermes/client/js/package.json b/apps/hermes/client/js/package.json index a49a5c7b2b..575e86f635 100644 --- a/apps/hermes/client/js/package.json +++ b/apps/hermes/client/js/package.json @@ -1,6 +1,6 @@ { "name": "@pythnetwork/hermes-client", - "version": "1.0.2", + "version": "1.0.3", "description": "Pyth Hermes Client", "author": { "name": "Pyth Data Association" diff --git a/apps/hermes/client/js/src/HermesClient.ts b/apps/hermes/client/js/src/HermesClient.ts index 12475dadd3..510c1043dd 100644 --- a/apps/hermes/client/js/src/HermesClient.ts +++ b/apps/hermes/client/js/src/HermesClient.ts @@ -100,7 +100,7 @@ export class HermesClient { query?: string; filter?: string; }): Promise { - const url = new URL("/v2/price_feeds", this.baseURL); + const url = new URL("v2/price_feeds", this.baseURL); if (options) { this.appendUrlSearchParams(url, options); } @@ -129,7 +129,7 @@ export class HermesClient { parsed?: boolean; } ): Promise { - const url = new URL(`${this.baseURL}/v2/updates/price/latest`); + const url = new URL(`v2/updates/price/latest`, this.baseURL); for (const id of ids) { url.searchParams.append("ids[]", id); } @@ -162,7 +162,7 @@ export class HermesClient { parsed?: boolean; } ): Promise { - const url = new URL(`${this.baseURL}/v2/updates/price/${publishTime}`); + const url = new URL(`v2/updates/price/${publishTime}`, this.baseURL); for (const id of ids) { url.searchParams.append("ids[]", id); } @@ -198,7 +198,7 @@ export class HermesClient { benchmarksOnly?: boolean; } ): Promise { - const url = new URL("/v2/updates/price/stream", this.baseURL); + const url = new URL("v2/updates/price/stream", this.baseURL); ids.forEach((id) => { url.searchParams.append("ids[]", id); });