aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-26 14:11:32 +0800
committerFabio Berger <me@fabioberger.com>2018-06-26 14:11:32 +0800
commitf780e6f235be0216eb37dbbdc148a9c19521cbaf (patch)
treebc8d053e0038afc5c27fcbdc3e01b2c25cb79474 /packages
parent27670f4da679f5dbd3a3b399f14ba437184d2633 (diff)
downloaddexon-0x-contracts-f780e6f235be0216eb37dbbdc148a9c19521cbaf.tar.gz
dexon-0x-contracts-f780e6f235be0216eb37dbbdc148a9c19521cbaf.tar.zst
dexon-0x-contracts-f780e6f235be0216eb37dbbdc148a9c19521cbaf.zip
Expect RevertReason be passed in, not string
Diffstat (limited to 'packages')
-rw-r--r--packages/contracts/src/utils/assertions.ts6
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);
}