aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/multi_sig_with_time_lock.ts
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-06-05 08:51:50 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-06-07 03:40:30 +0800
commit577a8dd005715ba0fd22a5118d99ccc87af0782c (patch)
treeb960bcdfd4219c7882407c37cd723dfac46a87b7 /packages/contracts/test/multi_sig_with_time_lock.ts
parent5900899c0195a851c8d20ca0d4ad85dbbf4c100f (diff)
downloaddexon-sol-tools-577a8dd005715ba0fd22a5118d99ccc87af0782c.tar
dexon-sol-tools-577a8dd005715ba0fd22a5118d99ccc87af0782c.tar.gz
dexon-sol-tools-577a8dd005715ba0fd22a5118d99ccc87af0782c.tar.bz2
dexon-sol-tools-577a8dd005715ba0fd22a5118d99ccc87af0782c.tar.lz
dexon-sol-tools-577a8dd005715ba0fd22a5118d99ccc87af0782c.tar.xz
dexon-sol-tools-577a8dd005715ba0fd22a5118d99ccc87af0782c.tar.zst
dexon-sol-tools-577a8dd005715ba0fd22a5118d99ccc87af0782c.zip
Fix some more test cases, especially those that call increaseTime
Diffstat (limited to 'packages/contracts/test/multi_sig_with_time_lock.ts')
-rw-r--r--packages/contracts/test/multi_sig_with_time_lock.ts11
1 files changed, 2 insertions, 9 deletions
diff --git a/packages/contracts/test/multi_sig_with_time_lock.ts b/packages/contracts/test/multi_sig_with_time_lock.ts
index 090ce91f5..b606f31ce 100644
--- a/packages/contracts/test/multi_sig_with_time_lock.ts
+++ b/packages/contracts/test/multi_sig_with_time_lock.ts
@@ -15,6 +15,7 @@ import { artifacts } from '../src/utils/artifacts';
import { expectRevertOrAlwaysFailingTransaction } from '../src/utils/assertions';
import { chaiSetup } from '../src/utils/chai_setup';
import { constants } from '../src/utils/constants';
+import { increaseTimeAndMineBlockAsync } from '../src/utils/increase_time';
import { MultiSigWrapper } from '../src/utils/multi_sig_wrapper';
import { provider, txDefaults, web3Wrapper } from '../src/utils/web3_wrapper';
@@ -155,16 +156,8 @@ describe('MultiSigWalletWithTimeLock', () => {
);
});
- // TODO(albrow): increaseTimeAsync not supported
it('should execute if it has enough confirmations and is past the time lock', async () => {
- await web3Wrapper.increaseTimeAsync(SECONDS_TIME_LOCKED.toNumber());
- // Note: we need to send a transaction after increasing time so
- // that a block is actually mined. The contract looks at the
- // last mined block for the timestamp.
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({ from: owners[0], to: owners[1], value: 1 }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
+ await increaseTimeAndMineBlockAsync(SECONDS_TIME_LOCKED.toNumber());
await web3Wrapper.awaitTransactionSuccessAsync(
await multiSig.executeTransaction.sendTransactionAsync(txId, { from: owners[0] }),
constants.AWAIT_TRANSACTION_MINED_MS,