aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util/balance.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon@0xproject.com>2018-11-09 09:35:54 +0800
committerGitHub <noreply@github.com>2018-11-09 09:35:54 +0800
commit12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39 (patch)
treef45b60fa2792667d7891ea6ae93e8a74f27567bc /packages/instant/src/util/balance.ts
parentca6f99da6158102f007c1c9b24fcba72c12beb3c (diff)
parentb147cd888505443981781d200a68b949812cb3e9 (diff)
downloaddexon-0x-contracts-12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39.tar
dexon-0x-contracts-12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39.tar.gz
dexon-0x-contracts-12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39.tar.bz2
dexon-0x-contracts-12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39.tar.lz
dexon-0x-contracts-12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39.tar.xz
dexon-0x-contracts-12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39.tar.zst
dexon-0x-contracts-12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39.zip
Merge pull request #1232 from 0xProject/feature/instant/account-state-change
[instant] Request account address and balance at mount
Diffstat (limited to 'packages/instant/src/util/balance.ts')
-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);
- },
-};