diff --git a/common/sdk/src/clients/lcd-client/lcd-client.abstract.ts b/common/sdk/src/clients/lcd-client/lcd-client.abstract.ts index 5c440479..632983b7 100644 --- a/common/sdk/src/clients/lcd-client/lcd-client.abstract.ts +++ b/common/sdk/src/clients/lcd-client/lcd-client.abstract.ts @@ -22,7 +22,7 @@ export class AbstractKyveLCDClient { this.restEndpoint = restEndpoint; this.request = (url: string, params?: Record) => axios - .get(new URL(url, this.restEndpoint).href, { params }) + .get(`${this.restEndpoint}${url}`, { params }) .then((res) => res.data); } } diff --git a/common/sdk/src/sdk.ts b/common/sdk/src/sdk.ts index f4165ca9..586f33d3 100644 --- a/common/sdk/src/sdk.ts +++ b/common/sdk/src/sdk.ts @@ -64,11 +64,11 @@ export class KyveSDK { } if (options?.rpc) { - this.config = { ...this.config, rpc: options.rpc }; + this.config = { ...this.config, rpc: options.rpc.replace(/\/$/, "") }; } if (options?.rest) { - this.config = { ...this.config, rest: options.rest }; + this.config = { ...this.config, rest: options.rest.replace(/\/$/, "") }; } if (options?.coin) {