mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-31 10:08:03 +03:00
Fix bugs
This commit is contained in:
@@ -9,7 +9,9 @@ import {
|
||||
} from '../../constants/index.js';
|
||||
import { denormalizeNumber, normalizeNumber } from '../../utils/index.js';
|
||||
import getNativeCryptocurrency from '../../utils/getNativeCryptocurrency.js';
|
||||
import { simpleFetch } from 'simple-typed-fetch';
|
||||
import stf from 'simple-typed-fetch';
|
||||
|
||||
const { simpleFetch } = stf;
|
||||
|
||||
export type DepositParams = {
|
||||
asset: string
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { ethers } from 'ethers';
|
||||
import { simpleFetch } from 'simple-typed-fetch';
|
||||
import stf from 'simple-typed-fetch';
|
||||
import { NATIVE_CURRENCY_PRECISION, SWAP_THROUGH_ORION_POOL_GAS_LIMIT } from '../../constants/index.js';
|
||||
import type { OrionAggregator } from '../../services/OrionAggregator/index.js';
|
||||
import type { OrionBlockchain } from '../../services/OrionBlockchain/index.js';
|
||||
|
||||
import { calculateFeeInFeeAsset, denormalizeNumber, getNativeCryptocurrency } from '../../utils/index.js';
|
||||
|
||||
const { simpleFetch } = stf;
|
||||
|
||||
export type GetSwapInfoParams = {
|
||||
type: 'exactSpend' | 'exactReceive'
|
||||
assetIn: string
|
||||
|
||||
@@ -11,7 +11,9 @@ import { calculateFeeInFeeAsset, denormalizeNumber, normalizeNumber } from '../.
|
||||
import { signOrder } from '../../crypt/index.js';
|
||||
import type orderSchema from '../../services/OrionAggregator/schemas/orderSchema.js';
|
||||
import type { z } from 'zod';
|
||||
import { simpleFetch } from 'simple-typed-fetch';
|
||||
import stf from 'simple-typed-fetch';
|
||||
|
||||
const { simpleFetch } = stf;
|
||||
|
||||
export type SwapLimitParams = {
|
||||
type: 'exactSpend' | 'exactReceive'
|
||||
|
||||
@@ -11,7 +11,9 @@ import { signOrder } from '../../crypt/index.js';
|
||||
import type orderSchema from '../../services/OrionAggregator/schemas/orderSchema.js';
|
||||
import type { z } from 'zod';
|
||||
import type { SwapLimitParams } from './swapLimit.js';
|
||||
import { simpleFetch } from 'simple-typed-fetch';
|
||||
import stf from 'simple-typed-fetch';
|
||||
|
||||
const { simpleFetch } = stf;
|
||||
|
||||
export type SwapMarketParams = Omit<SwapLimitParams, 'price'> & {
|
||||
slippagePercent: BigNumber.Value
|
||||
|
||||
@@ -9,7 +9,9 @@ import {
|
||||
} from '../../constants/index.js';
|
||||
import { denormalizeNumber, normalizeNumber } from '../../utils/index.js';
|
||||
import getNativeCryptocurrency from '../../utils/getNativeCryptocurrency.js';
|
||||
import { simpleFetch } from 'simple-typed-fetch';
|
||||
import stf from 'simple-typed-fetch';
|
||||
|
||||
const { simpleFetch } = stf;
|
||||
|
||||
export type WithdrawParams = {
|
||||
asset: string
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
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 stf from 'simple-typed-fetch';
|
||||
import type OrionUnit from '../index.js';
|
||||
import BalanceGuard from '../../BalanceGuard.js';
|
||||
import { ADD_LIQUIDITY_GAS_LIMIT, INTERNAL_ORION_PRECISION, NATIVE_CURRENCY_PRECISION } from '../../constants/index.js';
|
||||
@@ -9,6 +9,8 @@ import { denormalizeNumber, normalizeNumber } from '../../utils/index.js';
|
||||
import getBalances from '../../utils/getBalances.js';
|
||||
import getNativeCryptocurrency from '../../utils/getNativeCryptocurrency.js';
|
||||
|
||||
const { simpleFetch } = stf;
|
||||
|
||||
const ADD_LIQUIDITY_SLIPPAGE = 0.05;
|
||||
|
||||
export type AddLiquidityParams = {
|
||||
|
||||
Reference in New Issue
Block a user