aboutsummaryrefslogtreecommitdiffstats
path: root/packages/testnet-faucets
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2019-01-18 20:06:08 +0800
committerGitHub <noreply@github.com>2019-01-18 20:06:08 +0800
commit3973dec9944a10c62ec6c3d15d973a00a6ea45a6 (patch)
tree73f1528a36b8fc8a0778e164b1579eb5865d944a /packages/testnet-faucets
parentbef30e4209b26c8d4f443f8672e9acb9471c6a37 (diff)
parentc8212f1d4d255120e5e683664b86f1830fb45ae6 (diff)
downloaddexon-sol-tools-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.tar
dexon-sol-tools-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.tar.gz
dexon-sol-tools-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.tar.bz2
dexon-sol-tools-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.tar.lz
dexon-sol-tools-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.tar.xz
dexon-sol-tools-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.tar.zst
dexon-sol-tools-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.zip
Merge pull request #1517 from 0xProject/feature/bignumber-8.0
Bignumber 8.0
Diffstat (limited to 'packages/testnet-faucets')
-rw-r--r--packages/testnet-faucets/src/ts/dispense_asset_tasks.ts4
-rw-r--r--packages/testnet-faucets/src/ts/handler.ts6
2 files changed, 6 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 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..533e1f8b3 100644
--- a/packages/testnet-faucets/src/ts/handler.ts
+++ b/packages/testnet-faucets/src/ts/handler.ts
@@ -178,8 +178,10 @@ export class Handler {
exchangeAddress: networkConfig.contractWrappers.exchange.address,
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)
+ // tslint:disable-next-line:custom-no-magic-numbers
+ .div(1000)
+ .integerValue(BigNumber.ROUND_FLOOR),
};
const orderHash = orderHashUtils.getOrderHashHex(order);
const signature = await signatureUtils.ecSignHashAsync(