aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers/test/order_validation_test.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-05-24 05:16:32 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-05-24 05:16:32 +0800
commit3fe94891d3569a4615f4aa32d47f0065b5957fe9 (patch)
tree83d4e4ccf7748d2100aa935c457de0a893eaec9c /packages/contract-wrappers/test/order_validation_test.ts
parentd0abc60176dba3116cb3986d298ab5164c1fe49c (diff)
parentf6b81f588d98e09e7a5806902d94e2892d029481 (diff)
downloaddexon-sol-tools-3fe94891d3569a4615f4aa32d47f0065b5957fe9.tar.gz
dexon-sol-tools-3fe94891d3569a4615f4aa32d47f0065b5957fe9.tar.zst
dexon-sol-tools-3fe94891d3569a4615f4aa32d47f0065b5957fe9.zip
Merge branch 'v2-prototype' into feature/website/wallet-flex-box
* v2-prototype: (95 commits) Add missing dep to website Upgrade solidity parser Fix trace test Fix linter issues Move contract utils Fix prettier Fix NameResolver Fix prettier Remove 0x.js as a dependency from website Enable 0x.js tests Fix small bug in order-utils Address feedback Fix Tslint error caused by "PromiseLike" value Fix Tslint error caused by "PromiseLike" value Update dogfood url fix contract-wrappers version Parse compiler.json in SolCompilerArtifactsAdapter Fix TokenTransferProxy artifact name since it's now suffixed with _v1 Update yarn.lock Fix signature verification test ...
Diffstat (limited to 'packages/contract-wrappers/test/order_validation_test.ts')
-rw-r--r--packages/contract-wrappers/test/order_validation_test.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/contract-wrappers/test/order_validation_test.ts b/packages/contract-wrappers/test/order_validation_test.ts
index 2acdece3e..a14dc24b6 100644
--- a/packages/contract-wrappers/test/order_validation_test.ts
+++ b/packages/contract-wrappers/test/order_validation_test.ts
@@ -106,6 +106,7 @@ describe('OrderValidation', () => {
});
it('should succeed if the order is asymmetric and fillable', async () => {
const makerFillableAmount = fillableAmount;
+ // tslint:disable-next-line:custom-no-magic-numbers
const takerFillableAmount = fillableAmount.minus(4);
const signedOrder = await fillScenarios.createAsymmetricFillableSignedOrderAsync(
makerTokenAddress,
@@ -172,6 +173,7 @@ describe('OrderValidation', () => {
fillableAmount,
);
// 27 <--> 28
+ // tslint:disable-next-line:custom-no-magic-numbers
signedOrder.ecSignature.v = 28 - signedOrder.ecSignature.v + 27;
return expect(
contractWrappers.exchange.validateFillOrderThrowIfInvalidAsync(
@@ -206,6 +208,7 @@ describe('OrderValidation', () => {
takerAddress,
fillableAmount,
);
+ // tslint:disable-next-line:custom-no-magic-numbers
const nonTakerAddress = userAddresses[6];
return expect(
contractWrappers.exchange.validateFillOrderThrowIfInvalidAsync(
@@ -353,6 +356,7 @@ describe('OrderValidation', () => {
takerAddress,
zrxTokenAddress,
);
+ // tslint:disable-next-line:custom-no-magic-numbers
expect(transferFromAsync.callCount).to.be.equal(4);
expect(
transferFromAsync
@@ -423,6 +427,7 @@ describe('OrderValidation', () => {
takerAddress,
zrxTokenAddress,
);
+ // tslint:disable-next-line:custom-no-magic-numbers
expect(transferFromAsync.callCount).to.be.equal(4);
expect(
transferFromAsync
@@ -491,6 +496,7 @@ describe('OrderValidation', () => {
takerAddress,
zrxTokenAddress,
);
+ // tslint:disable-next-line:custom-no-magic-numbers
expect(transferFromAsync.callCount).to.be.equal(4);
const makerFillAmount = transferFromAsync.getCall(0).args[3];
expect(makerFillAmount).to.be.bignumber.equal(makerTokenAmount);
@@ -518,6 +524,7 @@ describe('OrderValidation', () => {
);
const makerPartialFee = makerFee.div(2);
const takerPartialFee = takerFee.div(2);
+ // tslint:disable-next-line:custom-no-magic-numbers
expect(transferFromAsync.callCount).to.be.equal(4);
const partialMakerFee = transferFromAsync.getCall(2).args[3];
expect(partialMakerFee).to.be.bignumber.equal(makerPartialFee);