address comments

This commit is contained in:
Michael Zhu 2019-10-22 11:52:16 -07:00
parent 3e5d166ec4
commit 752dd04546
3 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
import { constants } from '@0x/contracts-test-utils';
import { constants, Numberish } from '@0x/contracts-test-utils';
import { assetDataUtils } from '@0x/order-utils';
import { AssetProxyId } from '@0x/types';
import { BigNumber } from '@0x/utils';
@ -37,7 +37,7 @@ export class LocalBalanceStore extends BalanceStore {
* @param senderAddress Address whose ETH balance to decrease.
* @param amount Amount to decrease the balance by.
*/
public burnGas(senderAddress: string, amount: BigNumber | number): void {
public burnGas(senderAddress: string, amount: Numberish): void {
this._balances.eth[senderAddress] = this._balances.eth[senderAddress].minus(amount);
}
@ -47,7 +47,7 @@ export class LocalBalanceStore extends BalanceStore {
* @param toAddress Receiver of ETH.
* @param amount Amount of ETH to transfer.
*/
public sendEth(fromAddress: string, toAddress: string, amount: BigNumber | number): void {
public sendEth(fromAddress: string, toAddress: string, amount: Numberish): void {
this._balances.eth[fromAddress] = this._balances.eth[fromAddress].minus(amount);
this._balances.eth[toAddress] = this._balances.eth[toAddress].plus(amount);
}

View File

@ -251,7 +251,7 @@ blockchainTests.resets('Coordinator tests', env => {
transactionHash,
feeRecipient.address,
);
expect(tx).to.revertWith(expectedError);
return expect(tx).to.revertWith(expectedError);
});
it(`${fnName} should revert with an invalid approval signature`, async () => {
const approvalSignature = hexConcat(
@ -272,7 +272,7 @@ blockchainTests.resets('Coordinator tests', env => {
transactionHash,
feeRecipient.address,
);
expect(tx).to.revertWith(expectedError);
return expect(tx).to.revertWith(expectedError);
});
it(`${fnName} should revert if not called by tx signer or approver`, async () => {
const tx = coordinator.executeTransaction.awaitTransactionSuccessAsync(
@ -284,7 +284,7 @@ blockchainTests.resets('Coordinator tests', env => {
);
const expectedError = new CoordinatorRevertErrors.InvalidOriginError(taker.address);
expect(tx).to.revertWith(expectedError);
return expect(tx).to.revertWith(expectedError);
});
}
});
@ -371,7 +371,7 @@ blockchainTests.resets('Coordinator tests', env => {
transactionHash,
feeRecipient.address,
);
expect(tx).to.revertWith(expectedError);
return expect(tx).to.revertWith(expectedError);
});
it(`${fnName} should revert if not called by tx signer or approver`, async () => {
const tx = coordinator.executeTransaction.awaitTransactionSuccessAsync(
@ -382,7 +382,7 @@ blockchainTests.resets('Coordinator tests', env => {
{ from: maker.address, value: DeploymentManager.protocolFee.times(orders.length) },
);
const expectedError = new CoordinatorRevertErrors.InvalidOriginError(taker.address);
expect(tx).to.revertWith(expectedError);
return expect(tx).to.revertWith(expectedError);
});
}
});

View File

@ -123,7 +123,7 @@ export interface DeploymentOptions {
export class DeploymentManager {
public static readonly protocolFeeMultiplier = new BigNumber(150000);
public static readonly gasPrice = new BigNumber(1000000000); // 1 Gwei
public static readonly gasPrice = new BigNumber(1e9); // 1 Gwei
public static readonly protocolFee = DeploymentManager.gasPrice.times(DeploymentManager.protocolFeeMultiplier);
/**