mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-04-03 11:38:09 +03:00
Moved fetching to simple-typed-fetch
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
} from '../../constants';
|
||||
import { denormalizeNumber, normalizeNumber } from '../../utils';
|
||||
import getNativeCryptocurrency from '../../utils/getNativeCryptocurrency';
|
||||
import simpleFetch from '../../simpleFetch';
|
||||
import { simpleFetch } from 'simple-typed-fetch';
|
||||
|
||||
export type DepositParams = {
|
||||
asset: string
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { ethers } from 'ethers';
|
||||
import { simpleFetch } from 'simple-typed-fetch';
|
||||
import { NATIVE_CURRENCY_PRECISION, SWAP_THROUGH_ORION_POOL_GAS_LIMIT } from '../../constants';
|
||||
import type { OrionAggregator } from '../../services/OrionAggregator';
|
||||
import type { OrionBlockchain } from '../../services/OrionBlockchain';
|
||||
|
||||
import simpleFetch from '../../simpleFetch';
|
||||
import { calculateFeeInFeeAsset, denormalizeNumber, getNativeCryptocurrency } from '../../utils';
|
||||
|
||||
export type GetSwapInfoParams = {
|
||||
|
||||
@@ -7,11 +7,11 @@ import getAvailableSources from '../../utils/getAvailableFundsSources';
|
||||
import type OrionUnit from '..';
|
||||
import { INTERNAL_ORION_PRECISION, NATIVE_CURRENCY_PRECISION, SWAP_THROUGH_ORION_POOL_GAS_LIMIT } from '../../constants';
|
||||
import getNativeCryptocurrency from '../../utils/getNativeCryptocurrency';
|
||||
import simpleFetch from '../../simpleFetch';
|
||||
import { calculateFeeInFeeAsset, denormalizeNumber, normalizeNumber } from '../../utils';
|
||||
import { signOrder } from '../../crypt';
|
||||
import type orderSchema from '../../services/OrionAggregator/schemas/orderSchema';
|
||||
import type { z } from 'zod';
|
||||
import { simpleFetch } from 'simple-typed-fetch';
|
||||
|
||||
export type SwapLimitParams = {
|
||||
type: 'exactSpend' | 'exactReceive'
|
||||
|
||||
@@ -6,12 +6,12 @@ import BalanceGuard from '../../BalanceGuard';
|
||||
import getAvailableSources from '../../utils/getAvailableFundsSources';
|
||||
import { INTERNAL_ORION_PRECISION, NATIVE_CURRENCY_PRECISION, SWAP_THROUGH_ORION_POOL_GAS_LIMIT } from '../../constants';
|
||||
import getNativeCryptocurrency from '../../utils/getNativeCryptocurrency';
|
||||
import simpleFetch from '../../simpleFetch';
|
||||
import { calculateFeeInFeeAsset, denormalizeNumber, normalizeNumber } from '../../utils';
|
||||
import { signOrder } from '../../crypt';
|
||||
import type orderSchema from '../../services/OrionAggregator/schemas/orderSchema';
|
||||
import type { z } from 'zod';
|
||||
import type { SwapLimitParams } from './swapLimit';
|
||||
import { simpleFetch } from 'simple-typed-fetch';
|
||||
|
||||
export type SwapMarketParams = Omit<SwapLimitParams, 'price'> & {
|
||||
slippagePercent: BigNumber.Value
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
} from '../../constants';
|
||||
import { denormalizeNumber, normalizeNumber } from '../../utils';
|
||||
import getNativeCryptocurrency from '../../utils/getNativeCryptocurrency';
|
||||
import simpleFetch from '../../simpleFetch';
|
||||
import { simpleFetch } from 'simple-typed-fetch';
|
||||
|
||||
export type WithdrawParams = {
|
||||
asset: string
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Exchange__factory, IUniswapV2Pair__factory, IUniswapV2Router__factory } from '@orionprotocol/contracts';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { ethers } from 'ethers';
|
||||
import { simpleFetch } from 'simple-typed-fetch';
|
||||
import type OrionUnit from '..';
|
||||
import BalanceGuard from '../../BalanceGuard';
|
||||
import { ADD_LIQUIDITY_GAS_LIMIT, INTERNAL_ORION_PRECISION, NATIVE_CURRENCY_PRECISION } from '../../constants';
|
||||
import simpleFetch from '../../simpleFetch';
|
||||
import { denormalizeNumber, normalizeNumber } from '../../utils';
|
||||
import getBalances from '../../utils/getBalances';
|
||||
import getNativeCryptocurrency from '../../utils/getNativeCryptocurrency';
|
||||
|
||||
Reference in New Issue
Block a user