mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-04-06 21:18:12 +03:00
update getCrossChainAssetsByNetwork prop types
This commit is contained in:
@@ -8,7 +8,7 @@ import errorSchema from './schemas/errorSchema.js';
|
||||
import placeAtomicSwapSchema from './schemas/placeAtomicSwapSchema.js';
|
||||
import { AggregatorWS } from './ws';
|
||||
import { atomicSwapHistorySchema } from './schemas/atomicSwapHistorySchema.js';
|
||||
import type { BasicAuthCredentials, SignedCancelOrderRequest, SignedOrder, SupportedChainShortNames } from '../../types.js';
|
||||
import type { BasicAuthCredentials, SignedCancelOrderRequest, SignedOrder } from '../../types.js';
|
||||
import {
|
||||
pairConfigSchema, aggregatedOrderbookSchema,
|
||||
exchangeOrderbookSchema, poolReservesSchema,
|
||||
@@ -291,7 +291,7 @@ class Aggregator {
|
||||
);
|
||||
};
|
||||
|
||||
getCrossChainAssetsByNetwork = (sourceChain: SupportedChainShortNames) => {
|
||||
getCrossChainAssetsByNetwork = (sourceChain: Uppercase<typeof networkCodes[number]>) => {
|
||||
const url = new URL(`${this.apiUrl}/api/v1/cross-chain/assets`);
|
||||
url.searchParams.append('sourceChain', sourceChain);
|
||||
|
||||
|
||||
17
src/types.ts
17
src/types.ts
@@ -99,23 +99,6 @@ export enum SupportedChainId {
|
||||
// BROKEN = '0',
|
||||
}
|
||||
|
||||
export enum SupportedChainShortNames {
|
||||
MAINNET = 'ETH',
|
||||
ROPSTEN = 'ETH-Ropsten',
|
||||
GOERLI = 'ETH-Goerli',
|
||||
ARBITRUM_GOERLI = 'Arbitrum Goerli',
|
||||
FANTOM_OPERA = 'FTM',
|
||||
POLYGON = 'Polygon',
|
||||
OKC = 'OKC',
|
||||
|
||||
POLYGON_TESTNET = 'Polygon Mumbai',
|
||||
FANTOM_TESTNET = 'FTM-Testnet',
|
||||
BSC = 'BSC',
|
||||
BSC_TESTNET = 'BSC-Testnet',
|
||||
OKC_TESTNET = 'OKC-Testnet',
|
||||
DRIP_TESTNET = 'DRIP Chain',
|
||||
}
|
||||
|
||||
const balanceTypes = ['exchange', 'wallet'] as const;
|
||||
|
||||
export type Source = typeof balanceTypes[number];
|
||||
|
||||
Reference in New Issue
Block a user