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/src | |
parent | 6dc852774e23aa38c66188100c31ba42667620e8 (diff) | |
parent | 1bc742aed1e7f10b79b5ef23ebb57b6c93d64e3c (diff) | |
download | dexon-sol-tools-43ae868c6945045e0c467977e1b3db143e99fc8c.tar dexon-sol-tools-43ae868c6945045e0c467977e1b3db143e99fc8c.tar.gz dexon-sol-tools-43ae868c6945045e0c467977e1b3db143e99fc8c.tar.bz2 dexon-sol-tools-43ae868c6945045e0c467977e1b3db143e99fc8c.tar.lz dexon-sol-tools-43ae868c6945045e0c467977e1b3db143e99fc8c.tar.xz 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/src')
-rw-r--r-- | packages/contracts/src/utils/assertions.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/contracts/src/utils/assertions.ts b/packages/contracts/src/utils/assertions.ts index 29489e648..e702a3200 100644 --- a/packages/contracts/src/utils/assertions.ts +++ b/packages/contracts/src/utils/assertions.ts @@ -1,3 +1,4 @@ +import { RevertReason } from '@0xproject/types'; import * as chai from 'chai'; import * as _ from 'lodash'; @@ -59,7 +60,10 @@ export function expectRevertOrAlwaysFailingTransactionAsync<T>(p: Promise<T>): P * @returns a new Promise which will reject if the conditions are not met and * otherwise resolve with no value. */ -export function expectRevertReasonOrAlwaysFailingTransactionAsync<T>(p: Promise<T>, reason: string): PromiseLike<void> { +export function expectRevertReasonOrAlwaysFailingTransactionAsync<T>( + p: Promise<T>, + reason: RevertReason, +): PromiseLike<void> { return _expectEitherErrorAsync(p, 'always failing transaction', reason); } |