aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-13 01:25:48 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-13 01:25:48 +0800
commitaeefdeaef78fad38b84e728cceff2141eb302ab5 (patch)
tree19c9d923d342f700896095aaa4de683b240ed3d2 /packages
parentad3d20b34267eda1a9b1d397fb15f2bce0eb221f (diff)
downloaddexon-sol-tools-aeefdeaef78fad38b84e728cceff2141eb302ab5.tar
dexon-sol-tools-aeefdeaef78fad38b84e728cceff2141eb302ab5.tar.gz
dexon-sol-tools-aeefdeaef78fad38b84e728cceff2141eb302ab5.tar.bz2
dexon-sol-tools-aeefdeaef78fad38b84e728cceff2141eb302ab5.tar.lz
dexon-sol-tools-aeefdeaef78fad38b84e728cceff2141eb302ab5.tar.xz
dexon-sol-tools-aeefdeaef78fad38b84e728cceff2141eb302ab5.tar.zst
dexon-sol-tools-aeefdeaef78fad38b84e728cceff2141eb302ab5.zip
Remove unused util
Diffstat (limited to 'packages')
-rw-r--r--packages/instant/src/util/buy_quote.ts36
1 files changed, 0 insertions, 36 deletions
diff --git a/packages/instant/src/util/buy_quote.ts b/packages/instant/src/util/buy_quote.ts
deleted file mode 100644
index 0e880f51c..000000000
--- a/packages/instant/src/util/buy_quote.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { BuyQuoteInfo } from '@0x/asset-buyer';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import { oc } from 'ts-optchain';
-
-import { BIG_NUMBER_ZERO } from '../constants';
-
-export interface BuyQuoteWeiAmounts {
- assetTotalInWei: BigNumber | undefined;
- feeTotalInWei: BigNumber | undefined;
- grandTotalInWei: BigNumber | undefined;
- pricePerTokenInWei: BigNumber | undefined;
-}
-
-export const buyQuoteUtil = {
- getWeiAmounts: (
- selectedAssetUnitAmount: BigNumber | undefined,
- buyQuoteInfo: BuyQuoteInfo | undefined,
- ): BuyQuoteWeiAmounts => {
- const buyQuoteAccessor = oc(buyQuoteInfo);
- const assetTotalInWei = buyQuoteAccessor.assetEthAmount();
- const pricePerTokenInWei =
- !_.isUndefined(assetTotalInWei) &&
- !_.isUndefined(selectedAssetUnitAmount) &&
- !selectedAssetUnitAmount.eq(BIG_NUMBER_ZERO)
- ? assetTotalInWei.div(selectedAssetUnitAmount).ceil()
- : undefined;
-
- return {
- assetTotalInWei,
- feeTotalInWei: buyQuoteAccessor.feeEthAmount(),
- grandTotalInWei: buyQuoteAccessor.totalEthAmount(),
- pricePerTokenInWei,
- };
- },
-};