diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-14 22:50:32 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-15 23:25:24 +0800 |
commit | c3afc13dd660348e99b727c2dd01930eec8d99c3 (patch) | |
tree | 9a05e88e55200fdf72d08af10b5a753535e23256 /packages/testnet-faucets/src/ts | |
parent | f570f80674c22f69712c45e8e3c48e948b51f357 (diff) | |
download | dexon-0x-contracts-c3afc13dd660348e99b727c2dd01930eec8d99c3.tar.gz dexon-0x-contracts-c3afc13dd660348e99b727c2dd01930eec8d99c3.tar.zst dexon-0x-contracts-c3afc13dd660348e99b727c2dd01930eec8d99c3.zip |
Upgrade bignumber.js version
Diffstat (limited to 'packages/testnet-faucets/src/ts')
-rw-r--r-- | packages/testnet-faucets/src/ts/dispense_asset_tasks.ts | 4 | ||||
-rw-r--r-- | packages/testnet-faucets/src/ts/handler.ts | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts b/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts index 32f5cb623..58caeeeaa 100644 --- a/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts +++ b/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts @@ -19,7 +19,7 @@ export const dispenseAssetTasks = { logUtils.log(`Processing ETH ${recipientAddress}`); const userBalance = await web3Wrapper.getBalanceInWeiAsync(recipientAddress); const maxAmountInWei = Web3Wrapper.toWei(new BigNumber(DISPENSE_MAX_AMOUNT_ETHER)); - if (userBalance.greaterThanOrEqualTo(maxAmountInWei)) { + if (userBalance.isGreaterThanOrEqualTo(maxAmountInWei)) { logUtils.log( `User exceeded ETH balance maximum (${maxAmountInWei}) ${recipientAddress} ${userBalance} `, ); @@ -55,7 +55,7 @@ export const dispenseAssetTasks = { new BigNumber(DISPENSE_MAX_AMOUNT_TOKEN), tokenIfExists.decimals, ); - if (userBalanceBaseUnits.greaterThanOrEqualTo(maxAmountBaseUnits)) { + if (userBalanceBaseUnits.isGreaterThanOrEqualTo(maxAmountBaseUnits)) { logUtils.log( `User exceeded token balance maximum (${maxAmountBaseUnits}) ${recipientAddress} ${userBalanceBaseUnits} `, ); diff --git a/packages/testnet-faucets/src/ts/handler.ts b/packages/testnet-faucets/src/ts/handler.ts index 8f642d4b0..54387749f 100644 --- a/packages/testnet-faucets/src/ts/handler.ts +++ b/packages/testnet-faucets/src/ts/handler.ts @@ -179,7 +179,7 @@ export class Handler { feeRecipientAddress: NULL_ADDRESS, senderAddress: NULL_ADDRESS, // tslint:disable-next-line:custom-no-magic-numbers - expirationTimeSeconds: new BigNumber(Date.now() + FIVE_DAYS_IN_MS).div(1000).floor(), + expirationTimeSeconds: new BigNumber(Date.now() + FIVE_DAYS_IN_MS).div(1000).integerValue(BigNumber.ROUND_FLOOR), }; const orderHash = orderHashUtils.getOrderHashHex(order); const signature = await signatureUtils.ecSignHashAsync( |