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/transactions.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/transactions.ts')
-rw-r--r-- | packages/contracts/test/exchange/transactions.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/contracts/test/exchange/transactions.ts b/packages/contracts/test/exchange/transactions.ts index cfabe0435..67dc14e91 100644 --- a/packages/contracts/test/exchange/transactions.ts +++ b/packages/contracts/test/exchange/transactions.ts @@ -1,6 +1,6 @@ import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { assetProxyUtils, generatePseudoRandomSalt } from '@0xproject/order-utils'; -import { AssetProxyId, OrderWithoutExchangeAddress, RevertReasons, SignedOrder } from '@0xproject/types'; +import { AssetProxyId, OrderWithoutExchangeAddress, RevertReason, SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; @@ -130,7 +130,7 @@ describe('Exchange transactions', () => { it('should throw if not called by specified sender', async () => { return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.executeTransactionAsync(signedTx, takerAddress), - RevertReasons.FailedExecution, + RevertReason.FailedExecution, ); }); @@ -173,7 +173,7 @@ describe('Exchange transactions', () => { await exchangeWrapper.executeTransactionAsync(signedTx, senderAddress); return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.executeTransactionAsync(signedTx, senderAddress), - RevertReasons.InvalidTxHash, + RevertReason.InvalidTxHash, ); }); @@ -193,7 +193,7 @@ describe('Exchange transactions', () => { it('should throw if not called by specified sender', async () => { return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.executeTransactionAsync(signedTx, makerAddress), - RevertReasons.FailedExecution, + RevertReason.FailedExecution, ); }); @@ -201,7 +201,7 @@ describe('Exchange transactions', () => { await exchangeWrapper.executeTransactionAsync(signedTx, senderAddress); return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.fillOrderAsync(signedOrder, senderAddress), - RevertReasons.OrderUnfillable, + RevertReason.OrderUnfillable, ); }); }); @@ -253,7 +253,7 @@ describe('Exchange transactions', () => { signedFillTx.signature, { from: takerAddress }, ), - RevertReasons.FailedExecution, + RevertReason.FailedExecution, ); }); @@ -372,7 +372,7 @@ describe('Exchange transactions', () => { signedOrder.signature, { from: takerAddress }, ), - RevertReasons.MakerNotWhitelisted, + RevertReason.MakerNotWhitelisted, ); }); @@ -394,7 +394,7 @@ describe('Exchange transactions', () => { signedOrder.signature, { from: takerAddress }, ), - RevertReasons.TakerNotWhitelisted, + RevertReason.TakerNotWhitelisted, ); }); |