diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-20 19:25:29 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-20 19:25:29 +0800 |
commit | 2ffab2218584fac5d3ea2b264a7c746d963083d9 (patch) | |
tree | f7558147b811c06300e2c7697591466ae7cf48ba /packages/contracts/test/exchange/core.ts | |
parent | 5541327968ad6f974a37c49057253746f738a709 (diff) | |
parent | 096eaa20d785baee07b06b3f0848797e470fbda0 (diff) | |
download | dexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.tar.gz dexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.tar.zst dexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.zip |
Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype: (22 commits)
Fix closing parens in liborder
Update after rebase
ERC721Proxy Always call safeTransferFrom
Rename makerEpoch => orderEpoch
Make cancelOrdersUpTo compatible with sender abstraction
Update PR template
Use Image component instead of img tag
Assembler orderHash function
Optimize and remove redundant encodePacked
Fix linting issue
Fix bug where we do fetch balances on wallet login
Check network state immediately instead of waiting for delay
Fix onboarding persisting when changing routes
Consolidate account state messaging logic
Only elevate wallet zIndex when onboarding is in progress
Rebase and update feedback
Run linter
Add Portal v2 logging
Simplified handling of source < 32 edge case
Basic EIP712 encoder
...
Diffstat (limited to 'packages/contracts/test/exchange/core.ts')
-rw-r--r-- | packages/contracts/test/exchange/core.ts | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts index 64b7bf943..3c0116beb 100644 --- a/packages/contracts/test/exchange/core.ts +++ b/packages/contracts/test/exchange/core.ts @@ -252,30 +252,30 @@ describe('Exchange core', () => { }); describe('cancelOrdersUpTo', () => { - it('should fail to set makerEpoch less than current makerEpoch', async () => { - const makerEpoch = new BigNumber(1); - await exchangeWrapper.cancelOrdersUpToAsync(makerEpoch, makerAddress); - const lesserMakerEpoch = new BigNumber(0); + it('should fail to set orderEpoch less than current orderEpoch', async () => { + const orderEpoch = new BigNumber(1); + await exchangeWrapper.cancelOrdersUpToAsync(orderEpoch, makerAddress); + const lesserOrderEpoch = new BigNumber(0); return expectRevertOrAlwaysFailingTransactionAsync( - exchangeWrapper.cancelOrdersUpToAsync(lesserMakerEpoch, makerAddress), + exchangeWrapper.cancelOrdersUpToAsync(lesserOrderEpoch, makerAddress), ); }); - it('should fail to set makerEpoch equal to existing makerEpoch', async () => { - const makerEpoch = new BigNumber(1); - await exchangeWrapper.cancelOrdersUpToAsync(makerEpoch, makerAddress); + it('should fail to set orderEpoch equal to existing orderEpoch', async () => { + const orderEpoch = new BigNumber(1); + await exchangeWrapper.cancelOrdersUpToAsync(orderEpoch, makerAddress); return expectRevertOrAlwaysFailingTransactionAsync( - exchangeWrapper.cancelOrdersUpToAsync(makerEpoch, makerAddress), + exchangeWrapper.cancelOrdersUpToAsync(orderEpoch, makerAddress), ); }); - it('should cancel only orders with a makerEpoch less than existing makerEpoch', async () => { - // Cancel all transactions with a makerEpoch less than 1 - const makerEpoch = new BigNumber(1); - await exchangeWrapper.cancelOrdersUpToAsync(makerEpoch, makerAddress); + it('should cancel only orders with a orderEpoch less than existing orderEpoch', async () => { + // Cancel all transactions with a orderEpoch less than 1 + const orderEpoch = new BigNumber(1); + await exchangeWrapper.cancelOrdersUpToAsync(orderEpoch, makerAddress); - // Create 3 orders with makerEpoch values: 0,1,2,3 - // Since we cancelled with makerEpoch=1, orders with makerEpoch<=1 will not be processed + // Create 3 orders with orderEpoch values: 0,1,2,3 + // Since we cancelled with orderEpoch=1, orders with orderEpoch<=1 will not be processed erc20Balances = await erc20Wrapper.getBalancesAsync(); const signedOrders = [ orderFactory.newSignedOrder({ |