aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/contracts/test/exchange/signature_validator.ts8
-rw-r--r--packages/contracts/test/utils/match_order_tester.ts15
-rw-r--r--packages/tslint-config/rules/booleanNamingRule.ts2
3 files changed, 14 insertions, 11 deletions
diff --git a/packages/contracts/test/exchange/signature_validator.ts b/packages/contracts/test/exchange/signature_validator.ts
index b918cef60..d96b9e3fb 100644
--- a/packages/contracts/test/exchange/signature_validator.ts
+++ b/packages/contracts/test/exchange/signature_validator.ts
@@ -68,12 +68,12 @@ describe('MixinSignatureValidator', () => {
it('should return true with a valid signature', async () => {
const orderHashHex = orderUtils.getOrderHashHex(signedOrder);
- const success = await signatureValidator.publicIsValidSignature.callAsync(
+ const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
orderHashHex,
signedOrder.makerAddress,
signedOrder.signature,
);
- expect(success).to.be.true();
+ expect(isValidSignature).to.be.true();
});
it('should return false with an invalid signature', async () => {
@@ -87,12 +87,12 @@ describe('MixinSignatureValidator', () => {
const invalidSigHex = `0x${invalidSigBuff.toString('hex')}`;
signedOrder.signature = invalidSigHex;
const orderHashHex = orderUtils.getOrderHashHex(signedOrder);
- const success = await signatureValidator.publicIsValidSignature.callAsync(
+ const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
orderHashHex,
signedOrder.makerAddress,
signedOrder.signature,
);
- expect(success).to.be.false();
+ expect(isValidSignature).to.be.false();
});
});
});
diff --git a/packages/contracts/test/utils/match_order_tester.ts b/packages/contracts/test/utils/match_order_tester.ts
index da311e6ea..ae874e502 100644
--- a/packages/contracts/test/utils/match_order_tester.ts
+++ b/packages/contracts/test/utils/match_order_tester.ts
@@ -57,8 +57,8 @@ export class MatchOrderTester {
realERC721TokenIdsByOwner: ERC721TokenIdsByOwner,
): boolean {
// ERC20 Balances
- const erc20BalancesMatch = _.isEqual(expectedNewERC20BalancesByOwner, realERC20BalancesByOwner);
- if (!erc20BalancesMatch) {
+ const doesErc20BalancesMatch = _.isEqual(expectedNewERC20BalancesByOwner, realERC20BalancesByOwner);
+ if (!doesErc20BalancesMatch) {
return false;
}
// ERC721 Token Ids
@@ -75,8 +75,11 @@ export class MatchOrderTester {
_.sortBy(tokenIds);
});
});
- const erc721TokenIdsMatch = _.isEqual(sortedExpectedNewERC721TokenIdsByOwner, sortedNewERC721TokenIdsByOwner);
- return erc721TokenIdsMatch;
+ const doesErc721TokenIdsMatch = _.isEqual(
+ sortedExpectedNewERC721TokenIdsByOwner,
+ sortedNewERC721TokenIdsByOwner,
+ );
+ return doesErc721TokenIdsMatch;
}
/// @dev Constructs new MatchOrderTester.
/// @param exchangeWrapper Used to call to the Exchange.
@@ -156,13 +159,13 @@ export class MatchOrderTester {
expectedTransferAmounts,
);
// Assert our expected balances are equal to the actual balances
- const expectedBalancesMatchRealBalances = MatchOrderTester._compareExpectedAndRealBalances(
+ const didExpectedBalancesMatchRealBalances = MatchOrderTester._compareExpectedAndRealBalances(
expectedERC20BalancesByOwner,
newERC20BalancesByOwner,
expectedERC721TokenIdsByOwner,
newERC721TokenIdsByOwner,
);
- expect(expectedBalancesMatchRealBalances).to.be.true();
+ expect(didExpectedBalancesMatchRealBalances).to.be.true();
return [newERC20BalancesByOwner, newERC721TokenIdsByOwner];
}
/// @dev Calculates expected transfer amounts between order makers, fee recipients, and
diff --git a/packages/tslint-config/rules/booleanNamingRule.ts b/packages/tslint-config/rules/booleanNamingRule.ts
index f673afc6a..a8e1dc390 100644
--- a/packages/tslint-config/rules/booleanNamingRule.ts
+++ b/packages/tslint-config/rules/booleanNamingRule.ts
@@ -2,7 +2,7 @@ import * as _ from 'lodash';
import * as Lint from 'tslint';
import * as ts from 'typescript';
-const VALID_BOOLEAN_PREFIXES = ['is', 'does', 'should', 'was', 'has', 'can', 'did', 'would'];
+const VALID_BOOLEAN_PREFIXES = ['is', 'does', 'should', 'was', 'has', 'can', 'did', 'would', 'are'];
export class Rule extends Lint.Rules.TypedRule {
public static FAILURE_STRING = `Boolean variable names should begin with: ${VALID_BOOLEAN_PREFIXES.join(', ')}`;