mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
feat: switched to URL constructor
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.20.79-rc21",
|
||||
"version": "0.20.79-rc22",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user