diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-27 00:53:44 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-27 00:53:44 +0800 |
commit | 43ae868c6945045e0c467977e1b3db143e99fc8c (patch) | |
tree | 048bd493a3ae76469fabcf7aa5ec1fffe6cdb3b3 /packages/contracts/test/exchange/wrapper.ts | |
parent | 6dc852774e23aa38c66188100c31ba42667620e8 (diff) | |
parent | 1bc742aed1e7f10b79b5ef23ebb57b6c93d64e3c (diff) | |
download | dexon-sol-tools-43ae868c6945045e0c467977e1b3db143e99fc8c.tar.gz dexon-sol-tools-43ae868c6945045e0c467977e1b3db143e99fc8c.tar.zst dexon-sol-tools-43ae868c6945045e0c467977e1b3db143e99fc8c.zip |
Merge branch 'refactor/check-revert-reasons' into feature/combinatorial-testing
* refactor/check-revert-reasons:
Temporarily switch revert reasons to `TransferFailed`. Should be `InvalidAmount` but because of an oversight in the assembly implementation of `dispatchTransferFrom`, it always throws `TransferFailed`
Expect RevertReason be passed in, not string
Rename RevertReasons to RevertReason since singular enum names are more common
# Conflicts:
# packages/contracts/test/asset_proxy/proxies.ts
# packages/contracts/test/exchange/core.ts
Diffstat (limited to 'packages/contracts/test/exchange/wrapper.ts')
-rw-r--r-- | packages/contracts/test/exchange/wrapper.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/contracts/test/exchange/wrapper.ts b/packages/contracts/test/exchange/wrapper.ts index 7e3203291..32ca4859b 100644 --- a/packages/contracts/test/exchange/wrapper.ts +++ b/packages/contracts/test/exchange/wrapper.ts @@ -1,6 +1,6 @@ import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { assetProxyUtils } from '@0xproject/order-utils'; -import { AssetProxyId, RevertReasons, SignedOrder } from '@0xproject/types'; +import { AssetProxyId, RevertReason, SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as chai from 'chai'; @@ -175,7 +175,7 @@ describe('Exchange wrappers', () => { return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.fillOrKillOrderAsync(signedOrder, takerAddress), - RevertReasons.OrderUnfillable, + RevertReason.OrderUnfillable, ); }); @@ -188,7 +188,7 @@ describe('Exchange wrappers', () => { return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.fillOrKillOrderAsync(signedOrder, takerAddress), - RevertReasons.CompleteFillFailed, + RevertReason.CompleteFillFailed, ); }); }); @@ -503,7 +503,7 @@ describe('Exchange wrappers', () => { exchangeWrapper.batchFillOrKillOrdersAsync(signedOrders, takerAddress, { takerAssetFillAmounts, }), - RevertReasons.OrderUnfillable, + RevertReason.OrderUnfillable, ); }); }); @@ -708,7 +708,7 @@ describe('Exchange wrappers', () => { }), // We simply use the takerAssetData from the first order for all orders. // If they are not the same, the contract throws when validating the order signature - RevertReasons.InvalidOrderSignature, + RevertReason.InvalidOrderSignature, ); }); }); @@ -924,7 +924,7 @@ describe('Exchange wrappers', () => { exchangeWrapper.marketBuyOrdersAsync(signedOrders, takerAddress, { makerAssetFillAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(1000), 18), }), - RevertReasons.InvalidOrderSignature, + RevertReason.InvalidOrderSignature, ); }); }); |