mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-17 00:31:34 +03:00
feat: types update
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -23,8 +23,8 @@ export class Frontage {
|
||||
}: { searchValue: string } & TickersBaseSearchParams) => {
|
||||
const queryParams = [
|
||||
`searchValue=${encodeURIComponent(searchValue)}`,
|
||||
currentNetwork !== undefined ? `¤tNetwork=${encodeURIComponent(currentNetwork)}` : '',
|
||||
targetNetwork !== undefined ? `&targetNetwork=${encodeURIComponent(targetNetwork)}` : '',
|
||||
currentNetwork !== undefined ? `¤tNetwork=${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 ? `¤tNetwork=${encodeURIComponent(currentNetwork)}` : '',
|
||||
targetNetwork !== undefined ? `&targetNetwork=${encodeURIComponent(targetNetwork)}` : '',
|
||||
currentNetwork !== undefined ? `¤tNetwork=${encodeURIComponent(currentNetwork).toUpperCase()}` : '',
|
||||
targetNetwork !== undefined ? `&targetNetwork=${encodeURIComponent(targetNetwork).toUpperCase()}` : '',
|
||||
sortBy !== undefined ? `&sortBy=${encodeURIComponent(sortBy)}` : '',
|
||||
sortType !== undefined ? `&sortType=${encodeURIComponent(sortType)}` : '',
|
||||
offset !== undefined ? `&offset=${offset}` : '',
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user