aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-10-30 01:40:11 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-10-30 01:40:11 +0800
commit3f35239b27653da898218e53909982203fad6d17 (patch)
tree2acfc843dce83d5f8643980f9c74af25d12a18df /packages/instant/src/util
parentaab9bedd7fe1ab328e416024b6397f242d39d84f (diff)
downloaddexon-sol-tools-3f35239b27653da898218e53909982203fad6d17.tar.gz
dexon-sol-tools-3f35239b27653da898218e53909982203fad6d17.tar.zst
dexon-sol-tools-3f35239b27653da898218e53909982203fad6d17.zip
fix(instant): fix spelling error and BigNumber gte operation
Diffstat (limited to 'packages/instant/src/util')
-rw-r--r--packages/instant/src/util/balance.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/instant/src/util/balance.ts b/packages/instant/src/util/balance.ts
index 533656858..f2271495b 100644
--- a/packages/instant/src/util/balance.ts
+++ b/packages/instant/src/util/balance.ts
@@ -3,11 +3,11 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import * as _ from 'lodash';
export const balanceUtil = {
- hasSufficentEth: async (takerAddress: string | undefined, buyQuote: BuyQuote, web3Wrapper: Web3Wrapper) => {
+ hasSufficientEth: async (takerAddress: string | undefined, buyQuote: BuyQuote, web3Wrapper: Web3Wrapper) => {
if (_.isUndefined(takerAddress)) {
return false;
}
const balanceWei = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- return balanceWei >= buyQuote.worstCaseQuoteInfo.totalEthAmount;
+ return balanceWei.gte(buyQuote.worstCaseQuoteInfo.totalEthAmount);
},
};