feat: Frontage service code review

This commit is contained in:
Mikhail Gladchenko
2024-05-13 14:07:11 +01:00
parent a8f168228c
commit d676d59f22
2 changed files with 3 additions and 2 deletions

View File

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

View File

@@ -45,7 +45,8 @@ export class Frontage {
tickers,
}: { category: TickersCategories, tickers?: string } & TickersBaseSearchParams) => {
const queryParams = new URLSearchParams({
category: category === 'FAVORITES' && tickers !== undefined ? `tickers=${encodeURIComponent(tickers)}` : `category=${encodeURIComponent(category)}`,
tickers: category === 'FAVORITES' && tickers !== undefined ? encodeURIComponent(tickers) : '',
category: category !== 'FAVORITES' && tickers !== undefined ? encodeURIComponent(category) : '',
currentNetwork: currentNetwork !== undefined ? encodeURIComponent(currentNetwork).toUpperCase() : '',
targetNetwork: targetNetwork !== undefined ? encodeURIComponent(targetNetwork).toUpperCase() : '',
sortBy: sortBy !== undefined ? encodeURIComponent(sortBy) : '',