diff --git a/.changeset/calm-tables-sparkle.md b/.changeset/calm-tables-sparkle.md new file mode 100644 index 000000000..f37379580 --- /dev/null +++ b/.changeset/calm-tables-sparkle.md @@ -0,0 +1,6 @@ +--- +'@xchainjs/xchain-thorchain-query': minor +'@xchainjs/xchain-thorchain-amm': patch +--- + +CryptoAmount type removed diff --git a/examples/do-swap/doStreamingSwap.ts b/examples/do-swap/doStreamingSwap.ts index f9a1c4b9f..04c7adfab 100644 --- a/examples/do-swap/doStreamingSwap.ts +++ b/examples/do-swap/doStreamingSwap.ts @@ -3,8 +3,9 @@ import { Network } from '@xchainjs/xchain-client' import { Midgard, MidgardCache, MidgardQuery } from '@xchainjs/xchain-midgard-query' import { THORChain } from '@xchainjs/xchain-thorchain' import { AmmEstimateSwapParams, ThorchainAMM, Wallet } from '@xchainjs/xchain-thorchain-amm' -import { CryptoAmount, ThorchainCache, ThorchainQuery, Thornode, TxDetails } from '@xchainjs/xchain-thorchain-query' +import { ThorchainCache, ThorchainQuery, Thornode, TxDetails } from '@xchainjs/xchain-thorchain-query' import { + CryptoAmount, assetAmount, assetFromString, assetToBase, diff --git a/examples/do-swap/doSwap.ts b/examples/do-swap/doSwap.ts index a4ec021c9..145241c07 100644 --- a/examples/do-swap/doSwap.ts +++ b/examples/do-swap/doSwap.ts @@ -3,8 +3,9 @@ import { Network } from '@xchainjs/xchain-client' import { Midgard, MidgardCache, MidgardQuery } from '@xchainjs/xchain-midgard-query' import { THORChain } from '@xchainjs/xchain-thorchain' import { AmmEstimateSwapParams, ThorchainAMM, Wallet } from '@xchainjs/xchain-thorchain-amm' -import { CryptoAmount, ThorchainCache, ThorchainQuery, Thornode, TxDetails } from '@xchainjs/xchain-thorchain-query' +import { ThorchainCache, ThorchainQuery, Thornode, TxDetails } from '@xchainjs/xchain-thorchain-query' import { + CryptoAmount, assetAmount, assetFromString, assetToBase, diff --git a/examples/estimate-swap/estimateSwap.ts b/examples/estimate-swap/estimateSwap.ts index acaf76e3a..59e45df4d 100644 --- a/examples/estimate-swap/estimateSwap.ts +++ b/examples/estimate-swap/estimateSwap.ts @@ -1,7 +1,6 @@ import { Network } from '@xchainjs/xchain-client' import { Midgard, MidgardCache, MidgardQuery } from '@xchainjs/xchain-midgard-query' import { - CryptoAmount, QuoteSwapParams, SwapEstimate, ThorchainCache, @@ -9,7 +8,7 @@ import { Thornode, TxDetails, } from '@xchainjs/xchain-thorchain-query' -import { assetAmount, assetFromString, assetToBase, register9Rheader } from '@xchainjs/xchain-util' +import { CryptoAmount, assetAmount, assetFromString, assetToBase, register9Rheader } from '@xchainjs/xchain-util' import axios from 'axios' register9Rheader(axios) diff --git a/examples/liquidity/add-liquidity.ts b/examples/liquidity/add-liquidity.ts index 59b5b81dc..43b1723bb 100644 --- a/examples/liquidity/add-liquidity.ts +++ b/examples/liquidity/add-liquidity.ts @@ -3,14 +3,8 @@ import { Network } from '@xchainjs/xchain-client' import { Midgard, MidgardCache, MidgardQuery } from '@xchainjs/xchain-midgard-query' import { isAssetRuneNative } from '@xchainjs/xchain-thorchain' import { ThorchainAMM, Wallet } from '@xchainjs/xchain-thorchain-amm' -import { - AddliquidityPosition, - CryptoAmount, - ThorchainCache, - ThorchainQuery, - Thornode, -} from '@xchainjs/xchain-thorchain-query' -import { assetAmount, assetFromStringEx, assetToBase, register9Rheader } from '@xchainjs/xchain-util' +import { AddliquidityPosition, ThorchainCache, ThorchainQuery, Thornode } from '@xchainjs/xchain-thorchain-query' +import { CryptoAmount, assetAmount, assetFromStringEx, assetToBase, register9Rheader } from '@xchainjs/xchain-util' import axios from 'axios' register9Rheader(cosmosclient.config.globalAxios) diff --git a/examples/liquidity/add-savers.ts b/examples/liquidity/add-savers.ts index 4c4b81165..fc29bf1c3 100644 --- a/examples/liquidity/add-savers.ts +++ b/examples/liquidity/add-savers.ts @@ -1,8 +1,8 @@ import { Network } from '@xchainjs/xchain-client' import { Midgard, MidgardCache, MidgardQuery } from '@xchainjs/xchain-midgard-query' import { ThorchainAMM, Wallet } from '@xchainjs/xchain-thorchain-amm' -import { CryptoAmount, ThorchainCache, ThorchainQuery, Thornode } from '@xchainjs/xchain-thorchain-query' -import { assetAmount, assetFromStringEx, assetToBase, register9Rheader } from '@xchainjs/xchain-util' +import { ThorchainCache, ThorchainQuery, Thornode } from '@xchainjs/xchain-thorchain-query' +import { CryptoAmount, assetAmount, assetFromStringEx, assetToBase, register9Rheader } from '@xchainjs/xchain-util' import axios from 'axios' register9Rheader(axios) diff --git a/examples/liquidity/estimate-add-liquidity.ts b/examples/liquidity/estimate-add-liquidity.ts index f65e375ea..6bc569ffa 100644 --- a/examples/liquidity/estimate-add-liquidity.ts +++ b/examples/liquidity/estimate-add-liquidity.ts @@ -3,13 +3,12 @@ import { Midgard, MidgardCache, MidgardQuery } from '@xchainjs/xchain-midgard-qu import { isAssetRuneNative } from '@xchainjs/xchain-thorchain' import { AddliquidityPosition, - CryptoAmount, EstimateAddLP, ThorchainCache, ThorchainQuery, Thornode, } from '@xchainjs/xchain-thorchain-query' -import { assetAmount, assetFromStringEx, assetToBase, register9Rheader } from '@xchainjs/xchain-util' +import { CryptoAmount, assetAmount, assetFromStringEx, assetToBase, register9Rheader } from '@xchainjs/xchain-util' import axios from 'axios' register9Rheader(axios) diff --git a/examples/liquidity/estimate-add-saver.ts b/examples/liquidity/estimate-add-saver.ts index 7eb62d861..618b0b61f 100644 --- a/examples/liquidity/estimate-add-saver.ts +++ b/examples/liquidity/estimate-add-saver.ts @@ -1,13 +1,7 @@ import { Network } from '@xchainjs/xchain-client' import { Midgard, MidgardCache, MidgardQuery } from '@xchainjs/xchain-midgard-query' -import { - CryptoAmount, - EstimateAddSaver, - ThorchainCache, - ThorchainQuery, - Thornode, -} from '@xchainjs/xchain-thorchain-query' -import { assetAmount, assetFromStringEx, assetToBase, register9Rheader } from '@xchainjs/xchain-util' +import { EstimateAddSaver, ThorchainCache, ThorchainQuery, Thornode } from '@xchainjs/xchain-thorchain-query' +import { CryptoAmount, assetAmount, assetFromStringEx, assetToBase, register9Rheader } from '@xchainjs/xchain-util' import axios from 'axios' register9Rheader(axios) diff --git a/examples/loans/loanQuoteClosed.ts b/examples/loans/loanQuoteClosed.ts index 6c11252f8..86364e0f8 100644 --- a/examples/loans/loanQuoteClosed.ts +++ b/examples/loans/loanQuoteClosed.ts @@ -1,14 +1,8 @@ import { Network } from '@xchainjs/xchain-client' import { Midgard, MidgardCache, MidgardQuery } from '@xchainjs/xchain-midgard-query' import { ThorchainAMM } from '@xchainjs/xchain-thorchain-amm' -import { - CryptoAmount, - LoanCloseParams, - ThorchainCache, - ThorchainQuery, - Thornode, -} from '@xchainjs/xchain-thorchain-query' -import { assetAmount, assetFromStringEx, assetToBase, register9Rheader } from '@xchainjs/xchain-util' +import { LoanCloseParams, ThorchainCache, ThorchainQuery, Thornode } from '@xchainjs/xchain-thorchain-query' +import { CryptoAmount, assetAmount, assetFromStringEx, assetToBase, register9Rheader } from '@xchainjs/xchain-util' import axios from 'axios' register9Rheader(axios) diff --git a/examples/loans/loanQuoteOpen.ts b/examples/loans/loanQuoteOpen.ts index 24a2de75b..0d0dacddd 100644 --- a/examples/loans/loanQuoteOpen.ts +++ b/examples/loans/loanQuoteOpen.ts @@ -1,14 +1,8 @@ import { Network } from '@xchainjs/xchain-client' import { Midgard, MidgardCache, MidgardQuery } from '@xchainjs/xchain-midgard-query' import { ThorchainAMM } from '@xchainjs/xchain-thorchain-amm' -import { - CryptoAmount, - LoanOpenParams, - ThorchainCache, - ThorchainQuery, - Thornode, -} from '@xchainjs/xchain-thorchain-query' -import { assetAmount, assetFromStringEx, assetToBase, register9Rheader } from '@xchainjs/xchain-util' +import { LoanOpenParams, ThorchainCache, ThorchainQuery, Thornode } from '@xchainjs/xchain-thorchain-query' +import { CryptoAmount, assetAmount, assetFromStringEx, assetToBase, register9Rheader } from '@xchainjs/xchain-util' import axios from 'axios' register9Rheader(axios) diff --git a/packages/xchain-thorchain-amm/__tests__/thorchainAMM.test.ts b/packages/xchain-thorchain-amm/__tests__/thorchainAMM.test.ts index f44360242..fbc345148 100644 --- a/packages/xchain-thorchain-amm/__tests__/thorchainAMM.test.ts +++ b/packages/xchain-thorchain-amm/__tests__/thorchainAMM.test.ts @@ -1,8 +1,8 @@ import { AssetBTC } from '@xchainjs/xchain-bitcoin' import { AssetETH } from '@xchainjs/xchain-ethereum' import { AssetRuneNative } from '@xchainjs/xchain-thorchain' -import { CryptoAmount, ThorchainQuery } from '@xchainjs/xchain-thorchain-query' -import { Asset, assetAmount, assetToBase } from '@xchainjs/xchain-util' +import { ThorchainQuery } from '@xchainjs/xchain-thorchain-query' +import { Asset, CryptoAmount, assetAmount, assetToBase } from '@xchainjs/xchain-util' import mockMidgardApi from '../__mocks__/midgard-api' import mockThornodeApi from '../__mocks__/thornode-api' diff --git a/packages/xchain-thorchain-amm/src/thorchain-amm.ts b/packages/xchain-thorchain-amm/src/thorchain-amm.ts index 7bcd50eb7..2f523cca0 100644 --- a/packages/xchain-thorchain-amm/src/thorchain-amm.ts +++ b/packages/xchain-thorchain-amm/src/thorchain-amm.ts @@ -1,6 +1,5 @@ import { AddliquidityPosition, - CryptoAmount, EstimateAddLP, EstimateAddSaver, EstimateWithdrawLP, @@ -17,6 +16,7 @@ import { WithdrawLiquidityPosition, getSaver, } from '@xchainjs/xchain-thorchain-query' +import { CryptoAmount } from '@xchainjs/xchain-util' import { TxSubmitted } from './types' import { Wallet } from './wallet' diff --git a/packages/xchain-thorchain-amm/src/types.ts b/packages/xchain-thorchain-amm/src/types.ts index 02b601737..4a613f215 100644 --- a/packages/xchain-thorchain-amm/src/types.ts +++ b/packages/xchain-thorchain-amm/src/types.ts @@ -1,6 +1,6 @@ import { Balance, FeeOption } from '@xchainjs/xchain-client' -import { CryptoAmount, LiquidityPool } from '@xchainjs/xchain-thorchain-query' -import { Address, Asset, BaseAmount, Chain } from '@xchainjs/xchain-util' +import { LiquidityPool } from '@xchainjs/xchain-thorchain-query' +import { Address, Asset, BaseAmount, Chain, CryptoAmount } from '@xchainjs/xchain-util' export type AllBalances = { chain: Chain diff --git a/packages/xchain-thorchain-amm/src/wallet.ts b/packages/xchain-thorchain-amm/src/wallet.ts index 5b1e85fde..b8eacff2a 100644 --- a/packages/xchain-thorchain-amm/src/wallet.ts +++ b/packages/xchain-thorchain-amm/src/wallet.ts @@ -11,8 +11,8 @@ import { EVMClientParams } from '@xchainjs/xchain-evm' import { Client as LtcClient, LTCChain, defaultLtcParams } from '@xchainjs/xchain-litecoin' import { Client as MayaClient, MAYAChain, MayachainClientParams } from '@xchainjs/xchain-mayachain' import { Client as ThorClient, THORChain, ThorchainClient, ThorchainClientParams } from '@xchainjs/xchain-thorchain' -import { CryptoAmount, ThorchainQuery } from '@xchainjs/xchain-thorchain-query' -import { Address, Asset, assetFromString } from '@xchainjs/xchain-util' +import { ThorchainQuery } from '@xchainjs/xchain-thorchain-query' +import { Address, Asset, CryptoAmount, assetFromString } from '@xchainjs/xchain-util' import { Client as UTXOClient, UtxoClientParams } from '@xchainjs/xchain-utxo' import { diff --git a/packages/xchain-thorchain-query/__tests__/decimal-math.test.ts b/packages/xchain-thorchain-query/__tests__/decimal-math.test.ts index 626ebc7e4..0c97e3f14 100644 --- a/packages/xchain-thorchain-query/__tests__/decimal-math.test.ts +++ b/packages/xchain-thorchain-query/__tests__/decimal-math.test.ts @@ -1,8 +1,7 @@ -import { assetAmount, assetFromStringEx, assetToBase, baseAmount } from '@xchainjs/xchain-util' +import { CryptoAmount, assetAmount, assetFromStringEx, assetToBase, baseAmount } from '@xchainjs/xchain-util' import mockMidgardApi from '../__mocks__/midgard-api' import mockThornodeApi from '../__mocks__/thornode-api' -import { CryptoAmount } from '../src/crypto-amount' import { ThorchainQuery } from '../src/thorchain-query' import { AssetRuneNative } from '../src/utils' diff --git a/packages/xchain-thorchain-query/__tests__/liquidity-calcs.test.ts b/packages/xchain-thorchain-query/__tests__/liquidity-calcs.test.ts index a6cdfbaa3..81727d8ae 100644 --- a/packages/xchain-thorchain-query/__tests__/liquidity-calcs.test.ts +++ b/packages/xchain-thorchain-query/__tests__/liquidity-calcs.test.ts @@ -1,10 +1,9 @@ import { Pool } from '@xchainjs/xchain-thornode' -import { assetAmount, assetFromStringEx, assetToBase, baseAmount } from '@xchainjs/xchain-util' +import { CryptoAmount, assetAmount, assetFromStringEx, assetToBase, baseAmount } from '@xchainjs/xchain-util' import BigNumber from 'bignumber.js' import mockMidgardApi from '../__mocks__/midgard-api' import mockThornodeApi from '../__mocks__/thornode-api' -import { CryptoAmount } from '../src/crypto-amount' import { LiquidityPool } from '../src/liquidity-pool' import { ThorchainQuery } from '../src/thorchain-query' import { Block, LiquidityToAdd, PoolShareDetail, PostionDepositValue, UnitData } from '../src/types' diff --git a/packages/xchain-thorchain-query/__tests__/thorchain-query.test.ts b/packages/xchain-thorchain-query/__tests__/thorchain-query.test.ts index 8ffa651de..25a67b2a3 100644 --- a/packages/xchain-thorchain-query/__tests__/thorchain-query.test.ts +++ b/packages/xchain-thorchain-query/__tests__/thorchain-query.test.ts @@ -1,8 +1,7 @@ -import { assetAmount, assetFromStringEx, assetToBase } from '@xchainjs/xchain-util' +import { CryptoAmount, assetAmount, assetFromStringEx, assetToBase } from '@xchainjs/xchain-util' import mockMidgardApi from '../__mocks__/midgard-api' import mockThornodeApi from '../__mocks__/thornode-api' -import { CryptoAmount } from '../src/crypto-amount' import { ThorchainCache } from '../src/thorchain-cache' import { ThorchainQuery } from '../src/thorchain-query' import { QuoteSwapParams, TxDetails } from '../src/types' diff --git a/packages/xchain-thorchain-query/src/crypto-amount.ts b/packages/xchain-thorchain-query/src/crypto-amount.ts deleted file mode 100644 index ca5a8d69d..000000000 --- a/packages/xchain-thorchain-query/src/crypto-amount.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { - Asset, - AssetAmount, - BaseAmount, - assetToBase, - assetToString, - baseToAsset, - eqAsset, - formatAssetAmountCurrency, -} from '@xchainjs/xchain-util' -import { BigNumber } from 'bignumber.js' - -type CryptoNumeric = CryptoAmount | number | BigNumber - -/** - * Utility Class to combine an amount (asset/base) with the Asset - * - */ -export class CryptoAmount { - baseAmount: BaseAmount - readonly asset: Asset - constructor(amount: BaseAmount, asset: Asset) { - this.asset = asset - this.baseAmount = amount - } - plus(v: CryptoAmount): CryptoAmount { - this.check(v) - const assetAmountResult = assetToBase(this.assetAmount.plus(v.assetAmount)) - return new CryptoAmount(assetAmountResult, this.asset) - } - minus(v: CryptoAmount): CryptoAmount { - this.check(v) - const assetAmountResult = assetToBase(this.assetAmount.minus(v.assetAmount)) - return new CryptoAmount(assetAmountResult, this.asset) - } - times(v: CryptoNumeric): CryptoAmount { - this.check(v) - if (v instanceof CryptoAmount) { - const assetAmountResult = assetToBase(this.assetAmount.times(v.assetAmount)) - return new CryptoAmount(assetAmountResult, this.asset) - } else { - const assetAmountResult = assetToBase(this.assetAmount.times(v)) - return new CryptoAmount(assetAmountResult, this.asset) - } - } - div(v: CryptoNumeric): CryptoAmount { - this.check(v) - if (v instanceof CryptoAmount) { - const assetAmountResult = assetToBase(this.assetAmount.div(v.assetAmount)) - return new CryptoAmount(assetAmountResult, this.asset) - } else { - const assetAmountResult = assetToBase(this.assetAmount.div(v)) - return new CryptoAmount(assetAmountResult, this.asset) - } - } - lt(v: CryptoAmount): boolean { - this.check(v) - return this.assetAmount.lt(v.assetAmount) - } - lte(v: CryptoAmount): boolean { - this.check(v) - return this.assetAmount.lte(v.assetAmount) - } - gt(v: CryptoAmount): boolean { - this.check(v) - return this.assetAmount.gt(v.assetAmount) - } - gte(v: CryptoAmount): boolean { - this.check(v) - - return this.assetAmount.gte(v.assetAmount) - } - eq(v: CryptoAmount): boolean { - this.check(v) - return this.assetAmount.eq(v.assetAmount) - } - formatedAssetString(): string { - return formatAssetAmountCurrency({ - amount: this.assetAmount, - asset: this.asset, - trimZeros: true, - }) - } - assetAmountFixedString(): string { - return this.assetAmount.amount().toFixed() - } - get assetAmount(): AssetAmount { - return baseToAsset(this.baseAmount) - } - /** - * This guard protects against trying to perform math with different assets - * - * Example. - * const x = new CryptoAmount(assetAmount(1),AssetBTC) - * const y = new CryptoAmount(assetAmount(1),AssetETH) - * - * x.plus(y) <- will throw error "cannot perform math on 2 diff assets BTC.BTC ETH.ETH - * - * @param v - CryptoNumeric - */ - private check(v: CryptoNumeric) { - if (v instanceof CryptoAmount) { - if (!eqAsset(this.asset, v.asset)) { - throw Error(`cannot perform math on 2 diff assets ${assetToString(this.asset)} ${assetToString(v.asset)}`) - } - } - } -} diff --git a/packages/xchain-thorchain-query/src/index.ts b/packages/xchain-thorchain-query/src/index.ts index 481dd8892..48427d8b3 100644 --- a/packages/xchain-thorchain-query/src/index.ts +++ b/packages/xchain-thorchain-query/src/index.ts @@ -2,7 +2,6 @@ export * from './thorchain-query' export * from './thorchain-checktx' export * from './thorchain-cache' export * from './liquidity-pool' -export * from './crypto-amount' export * from './chain-defaults' export * from './types' export * from './utils' diff --git a/packages/xchain-thorchain-query/src/thorchain-cache.ts b/packages/xchain-thorchain-query/src/thorchain-cache.ts index 3e935e700..fd3952c22 100644 --- a/packages/xchain-thorchain-query/src/thorchain-cache.ts +++ b/packages/xchain-thorchain-query/src/thorchain-cache.ts @@ -1,8 +1,16 @@ import { MidgardQuery } from '@xchainjs/xchain-midgard-query' -import { Address, Asset, CachedValue, Chain, assetToString, baseAmount, eqAsset } from '@xchainjs/xchain-util' +import { + Address, + Asset, + CachedValue, + Chain, + CryptoAmount, + assetToString, + baseAmount, + eqAsset, +} from '@xchainjs/xchain-util' import { BigNumber } from 'bignumber.js' -import { CryptoAmount } from './crypto-amount' import { LiquidityPool } from './liquidity-pool' import { InboundDetail } from './types' import { THORChain, isAssetRuneNative } from './utils' diff --git a/packages/xchain-thorchain-query/src/thorchain-checktx.ts b/packages/xchain-thorchain-query/src/thorchain-checktx.ts index cab41f2e1..8b143cf22 100644 --- a/packages/xchain-thorchain-query/src/thorchain-checktx.ts +++ b/packages/xchain-thorchain-query/src/thorchain-checktx.ts @@ -1,8 +1,7 @@ import { Saver, TxDetailsResponse, TxSignersResponse } from '@xchainjs/xchain-thornode' -import { Asset, Chain, assetFromStringEx, baseAmount } from '@xchainjs/xchain-util' +import { Asset, Chain, CryptoAmount, assetFromStringEx, baseAmount } from '@xchainjs/xchain-util' import { DefaultChainAttributes } from './chain-defaults' -import { CryptoAmount } from './crypto-amount' import { ThorchainCache } from './thorchain-cache' import { ChainAttributes } from './types' import { AssetRuneNative, THORChain, isAssetRuneNative } from './utils' diff --git a/packages/xchain-thorchain-query/src/thorchain-query.ts b/packages/xchain-thorchain-query/src/thorchain-query.ts index aee4a2e92..e1d3ae740 100644 --- a/packages/xchain-thorchain-query/src/thorchain-query.ts +++ b/packages/xchain-thorchain-query/src/thorchain-query.ts @@ -3,6 +3,7 @@ import { Address, Asset, Chain, + CryptoAmount, assetAmount, assetFromStringEx, assetToBase, @@ -12,7 +13,6 @@ import { import { BigNumber } from 'bignumber.js' import { DefaultChainAttributes } from './chain-defaults' -import { CryptoAmount } from './crypto-amount' import { ThorchainCache } from './thorchain-cache' import { AddliquidityPosition, diff --git a/packages/xchain-thorchain-query/src/types.ts b/packages/xchain-thorchain-query/src/types.ts index 719110765..567ffc924 100644 --- a/packages/xchain-thorchain-query/src/types.ts +++ b/packages/xchain-thorchain-query/src/types.ts @@ -1,10 +1,8 @@ import { FeeOption } from '@xchainjs/xchain-client' import { LiquidityProviderSummary } from '@xchainjs/xchain-thornode' -import { Address, Asset, BaseAmount, Chain } from '@xchainjs/xchain-util' +import { Address, Asset, BaseAmount, Chain, CryptoAmount } from '@xchainjs/xchain-util' import { BigNumber } from 'bignumber.js' -import { CryptoAmount } from './crypto-amount' - export type TotalFees = { asset: Asset affiliateFee: CryptoAmount diff --git a/packages/xchain-thorchain-query/src/utils/liquidity.ts b/packages/xchain-thorchain-query/src/utils/liquidity.ts index fbd658d50..1859cd2fc 100644 --- a/packages/xchain-thorchain-query/src/utils/liquidity.ts +++ b/packages/xchain-thorchain-query/src/utils/liquidity.ts @@ -1,7 +1,6 @@ -import { baseAmount } from '@xchainjs/xchain-util' +import { CryptoAmount, baseAmount } from '@xchainjs/xchain-util' import { BigNumber } from 'bignumber.js' -import { CryptoAmount } from '../crypto-amount' import { LiquidityPool } from '../liquidity-pool' import { Block, ILProtectionData, LiquidityToAdd, PoolShareDetail, PostionDepositValue, UnitData } from '../types' diff --git a/packages/xchain-thorchain-query/src/utils/utils.ts b/packages/xchain-thorchain-query/src/utils/utils.ts index b06a50438..5ab8f38f1 100644 --- a/packages/xchain-thorchain-query/src/utils/utils.ts +++ b/packages/xchain-thorchain-query/src/utils/utils.ts @@ -2,12 +2,12 @@ import { // Address, Asset, Chain, + CryptoAmount, baseAmount, eqAsset, } from '@xchainjs/xchain-util' import { BigNumber } from 'bignumber.js' -import { CryptoAmount } from '../crypto-amount' import { InboundDetail } from '../types' // eslint-disable-next-line ordered-imports/ordered-imports import {