feat: switched to URL constructor

This commit is contained in:
Mikhail Gladchenko
2024-05-14 09:51:58 +01:00
parent 4d4030c6e5
commit d80599eef2
2 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@orionprotocol/sdk",
"version": "0.20.79-rc22",
"version": "0.20.79-rc23",
"description": "Orion Protocol SDK",
"main": "./lib/index.cjs",
"module": "./lib/index.js",

View File

@@ -29,7 +29,7 @@ export class Frontage {
if (offset !== undefined) params.set('offset', offset.toString());
if (limit !== undefined) params.set('limit', limit.toString());
url.pathname += 'api/v1/tickers/search';
url.pathname += '/api/v1/tickers/search';
url.search = params.toString();
return fetchWithValidation(
@@ -61,9 +61,9 @@ export class Frontage {
if (limit !== undefined) params.set('limit', limit.toString());
if (category === 'FAVORITES' && tickers !== undefined) {
url.pathname += 'api/v1/tickers/get/favourites';
url.pathname += '/api/v1/tickers/get/favourites';
} else {
url.pathname += 'api/v1/tickers/get/category';
url.pathname += '/api/v1/tickers/get/category';
}
url.search = params.toString();