diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-13 01:25:48 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-13 01:25:48 +0800 |
commit | aeefdeaef78fad38b84e728cceff2141eb302ab5 (patch) | |
tree | 19c9d923d342f700896095aaa4de683b240ed3d2 /packages/instant/src | |
parent | ad3d20b34267eda1a9b1d397fb15f2bce0eb221f (diff) | |
download | dexon-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/instant/src')
-rw-r--r-- | packages/instant/src/util/buy_quote.ts | 36 |
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, - }; - }, -}; |