aboutsummaryrefslogtreecommitdiffstats
path: root/packages/testnet-faucets/src/ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/testnet-faucets/src/ts')
-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(