diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-06-06 06:12:09 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-06-07 03:40:31 +0800 |
commit | 63caddea62453863de84a4b53e14fe3e61d3008f (patch) | |
tree | f9fa506486272d49e708b44e9f65dc86c196aeea /packages/contracts | |
parent | 36b01fbdcfcda93d185e018e31a919c36f2848ac (diff) | |
download | dexon-sol-tools-63caddea62453863de84a4b53e14fe3e61d3008f.tar dexon-sol-tools-63caddea62453863de84a4b53e14fe3e61d3008f.tar.gz dexon-sol-tools-63caddea62453863de84a4b53e14fe3e61d3008f.tar.bz2 dexon-sol-tools-63caddea62453863de84a4b53e14fe3e61d3008f.tar.lz dexon-sol-tools-63caddea62453863de84a4b53e14fe3e61d3008f.tar.xz dexon-sol-tools-63caddea62453863de84a4b53e14fe3e61d3008f.tar.zst dexon-sol-tools-63caddea62453863de84a4b53e14fe3e61d3008f.zip |
Small fixes and cleanup
Diffstat (limited to 'packages/contracts')
-rw-r--r-- | packages/contracts/src/utils/assertions.ts | 6 | ||||
-rw-r--r-- | packages/contracts/src/utils/constants.ts | 2 | ||||
-rw-r--r-- | packages/contracts/test/asset_proxy_owner.ts | 4 |
3 files changed, 4 insertions, 8 deletions
diff --git a/packages/contracts/src/utils/assertions.ts b/packages/contracts/src/utils/assertions.ts index 4fc410363..1ea071d01 100644 --- a/packages/contracts/src/utils/assertions.ts +++ b/packages/contracts/src/utils/assertions.ts @@ -13,8 +13,7 @@ export function expectRevertOrAlwaysFailingTransaction<T>(p: Promise<T>): Promis .then(e => { expect(e).to.satisfy( (err: Error) => - _.includes(err.message, constants.REVERT) || - _.includes(err.message, constants.ALWAYS_FAILING_TRANSACTION), + _.includes(err.message, constants.REVERT) || _.includes(err.message, 'always failing transaction'), ); }); } @@ -37,8 +36,7 @@ export function expectRevertOrContractCallFailed<T>(p: Promise<T>): PromiseLike< .then(e => { expect(e).to.satisfy( (err: Error) => - _.includes(err.message, constants.REVERT) || - _.includes(err.message, constants.CONTRACT_CALL_FAILED), + _.includes(err.message, constants.REVERT) || _.includes(err.message, 'Contract call failed'), ); }); } diff --git a/packages/contracts/src/utils/constants.ts b/packages/contracts/src/utils/constants.ts index a21ca29ed..fa2a4af3c 100644 --- a/packages/contracts/src/utils/constants.ts +++ b/packages/contracts/src/utils/constants.ts @@ -19,8 +19,6 @@ const TESTRPC_PRIVATE_KEYS_STRINGS = [ export const constants = { INVALID_OPCODE: 'invalid opcode', REVERT: 'revert', - ALWAYS_FAILING_TRANSACTION: 'always failing transaction', - CONTRACT_CALL_FAILED: 'Contract call failed', LIB_BYTES_GT_ZERO_LENGTH_REQUIRED: 'Length must be greater than 0.', LIB_BYTES_GTE_4_LENGTH_REQUIRED: 'Length must be greater than or equal to 4.', LIB_BYTES_GTE_20_LENGTH_REQUIRED: 'Length must be greater than or equal to 20.', diff --git a/packages/contracts/test/asset_proxy_owner.ts b/packages/contracts/test/asset_proxy_owner.ts index c4085cb41..780ba2a4c 100644 --- a/packages/contracts/test/asset_proxy_owner.ts +++ b/packages/contracts/test/asset_proxy_owner.ts @@ -30,7 +30,7 @@ describe('AssetProxyOwner', () => { let owners: string[]; let authorized: string; const REQUIRED_APPROVALS = new BigNumber(2); - const SECONDS_TIME_LOCKED = new BigNumber(1000); + const SECONDS_TIME_LOCKED = new BigNumber(1000000); let erc20Proxy: MixinAuthorizableContract; let erc721Proxy: MixinAuthorizableContract; @@ -162,7 +162,7 @@ describe('AssetProxyOwner', () => { const log = submitTxRes.logs[0] as LogWithDecodedArgs<SubmissionContractEventArgs>; const txId = log.args.transactionId; - const confirmTxRes = await multiSigWrapper.confirmTransactionAsync(txId, owners[1]); + await multiSigWrapper.confirmTransactionAsync(txId, owners[1]); await increaseTimeAndMineBlockAsync(SECONDS_TIME_LOCKED.toNumber()); const executeTxRes = await multiSigWrapper.executeTransactionAsync(txId, owners[0]); |