aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-11-08 15:36:00 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-11-08 15:41:25 +0800
commitcde192df0d48bb45f57c319179dbd9f64abd13e9 (patch)
tree010893e4f4e993e668d26bf049a446a27e4a48fc /packages/instant/src/util
parentd0c009adff53d94414cf51028eff490e0452a3c9 (diff)
downloaddexon-sol-tools-cde192df0d48bb45f57c319179dbd9f64abd13e9.tar
dexon-sol-tools-cde192df0d48bb45f57c319179dbd9f64abd13e9.tar.gz
dexon-sol-tools-cde192df0d48bb45f57c319179dbd9f64abd13e9.tar.bz2
dexon-sol-tools-cde192df0d48bb45f57c319179dbd9f64abd13e9.tar.lz
dexon-sol-tools-cde192df0d48bb45f57c319179dbd9f64abd13e9.tar.xz
dexon-sol-tools-cde192df0d48bb45f57c319179dbd9f64abd13e9.tar.zst
dexon-sol-tools-cde192df0d48bb45f57c319179dbd9f64abd13e9.zip
feat(instant): fetch balance at startup
Diffstat (limited to 'packages/instant/src/util')
-rw-r--r--packages/instant/src/util/balance.ts13
1 files changed, 0 insertions, 13 deletions
diff --git a/packages/instant/src/util/balance.ts b/packages/instant/src/util/balance.ts
deleted file mode 100644
index f2271495b..000000000
--- a/packages/instant/src/util/balance.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { BuyQuote } from '@0x/asset-buyer';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-
-export const balanceUtil = {
- hasSufficientEth: async (takerAddress: string | undefined, buyQuote: BuyQuote, web3Wrapper: Web3Wrapper) => {
- if (_.isUndefined(takerAddress)) {
- return false;
- }
- const balanceWei = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- return balanceWei.gte(buyQuote.worstCaseQuoteInfo.totalEthAmount);
- },
-};