diff options
author | Jacob Evans <jacob@dekz.net> | 2018-03-01 06:25:07 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-03-01 06:25:07 +0800 |
commit | a46199e37dddd255fbfa6339d9f5a2a4d035ee86 (patch) | |
tree | 814e32aadfaccfe7b49fa7ecb75ba7cbdf634c4f /packages/testnet-faucets/src/ts/dispense_asset_tasks.ts | |
parent | addca63938c459635aba777104bab05dee0a5183 (diff) | |
download | dexon-0x-contracts-a46199e37dddd255fbfa6339d9f5a2a4d035ee86.tar.gz dexon-0x-contracts-a46199e37dddd255fbfa6339d9f5a2a4d035ee86.tar.zst dexon-0x-contracts-a46199e37dddd255fbfa6339d9f5a2a4d035ee86.zip |
Set max to 2 ETH/2 ZRX
Diffstat (limited to 'packages/testnet-faucets/src/ts/dispense_asset_tasks.ts')
-rw-r--r-- | packages/testnet-faucets/src/ts/dispense_asset_tasks.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts b/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts index fd7350704..56b0a9e45 100644 --- a/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts +++ b/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts @@ -9,8 +9,8 @@ import { utils } from './utils'; const DISPENSE_AMOUNT_ETHER = 0.1; const DISPENSE_AMOUNT_TOKEN = 0.1; -const DISPENSE_MAX_AMOUNT_TOKEN = 5; -const DISPENSE_MAX_AMOUNT_ETHER = 5; +const DISPENSE_MAX_AMOUNT_TOKEN = 2; +const DISPENSE_MAX_AMOUNT_ETHER = 2; export const dispenseAssetTasks = { dispenseEtherTask(recipientAddress: string, web3: Web3) { @@ -18,7 +18,7 @@ export const dispenseAssetTasks = { utils.consoleLog(`Processing ETH ${recipientAddress}`); const userBalance = await promisify<BigNumber>(web3.eth.getBalance)(recipientAddress); const maxAmountInWei = new BigNumber(web3.toWei(DISPENSE_MAX_AMOUNT_ETHER, 'ether')); - if (userBalance.greaterThan(maxAmountInWei)) { + if (userBalance.greaterThanOrEqualTo(maxAmountInWei)) { utils.consoleLog( `User exceeded ETH balance maximum (${maxAmountInWei}) ${recipientAddress} ${userBalance} `, ); @@ -47,7 +47,7 @@ export const dispenseAssetTasks = { new BigNumber(DISPENSE_MAX_AMOUNT_TOKEN), token.decimals, ); - if (userBalanceBaseUnits.greaterThan(maxAmountBaseUnits)) { + if (userBalanceBaseUnits.greaterThanOrEqualTo(maxAmountBaseUnits)) { utils.consoleLog( `User exceeded token balance maximum (${maxAmountBaseUnits}) ${recipientAddress} ${userBalanceBaseUnits} `, ); |