feat: types update

This commit is contained in:
Mikhail Gladchenko
2024-03-29 12:29:24 +00:00
parent 252b7fc341
commit ba4d7d1137
3 changed files with 7 additions and 7 deletions

View File

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

View File

@@ -23,8 +23,8 @@ export class Frontage {
}: { searchValue: string } & TickersBaseSearchParams) => {
const queryParams = [
`searchValue=${encodeURIComponent(searchValue)}`,
currentNetwork !== undefined ? `&currentNetwork=${encodeURIComponent(currentNetwork)}` : '',
targetNetwork !== undefined ? `&targetNetwork=${encodeURIComponent(targetNetwork)}` : '',
currentNetwork !== undefined ? `&currentNetwork=${encodeURIComponent(currentNetwork).toUpperCase()}` : '',
targetNetwork !== undefined ? `&targetNetwork=${encodeURIComponent(targetNetwork).toUpperCase()}` : '',
sortBy !== undefined ? `&sortBy=${encodeURIComponent(sortBy)}` : '',
sortType !== undefined ? `&sortType=${encodeURIComponent(sortType)}` : '',
offset !== undefined ? `&offset=${offset}` : '',
@@ -48,8 +48,8 @@ export class Frontage {
}: { category: TickersCategories } & TickersBaseSearchParams) => {
const queryParams = [
`category=${encodeURIComponent(category)}`,
currentNetwork !== undefined ? `&currentNetwork=${encodeURIComponent(currentNetwork)}` : '',
targetNetwork !== undefined ? `&targetNetwork=${encodeURIComponent(targetNetwork)}` : '',
currentNetwork !== undefined ? `&currentNetwork=${encodeURIComponent(currentNetwork).toUpperCase()}` : '',
targetNetwork !== undefined ? `&targetNetwork=${encodeURIComponent(targetNetwork).toUpperCase()}` : '',
sortBy !== undefined ? `&sortBy=${encodeURIComponent(sortBy)}` : '',
sortType !== undefined ? `&sortType=${encodeURIComponent(sortType)}` : '',
offset !== undefined ? `&offset=${offset}` : '',

View File

@@ -5,7 +5,7 @@ import type subOrderStatuses from './constants/subOrderStatuses.js';
import type positionStatuses from './constants/positionStatuses.js';
import type { knownEnvs } from './config/schemas';
import type getHistory from './Orion/bridge/getHistory.js';
import type uppercasedNetworkCodes from './constants/uppercasedNetworkCodes';
import type { networkCodes } from './constants';
export type DeepPartial<T> = T extends object ? {
[P in keyof T]?: DeepPartial<T[P]>;
@@ -468,7 +468,7 @@ export type AtomicSwap = Partial<
export type OrderSource = 'TERMINAL_MARKET' | 'TERMINAL_LIMIT' | 'SWAP_UI' | 'WIDGET';
// Frontage
export type NetworkCode = typeof uppercasedNetworkCodes[number];
export type NetworkCode = typeof networkCodes[number];
export type TickersCategories = 'USD' | 'ORN' | 'BNB' | 'ALTS';