mirror of
https://github.com/tornadocash/tornado-core.git
synced 2025-05-07 00:35:07 -04:00
add pauseDeposits
This commit is contained in:
parent
9b14a22b0d
commit
d91435dd00
9 changed files with 1642 additions and 5 deletions
|
@ -111,6 +111,17 @@ contract('Mixer', accounts => {
|
|||
logs[0].args.leafIndex.should.be.eq.BN(toBN(1))
|
||||
})
|
||||
|
||||
it('should not deposit if disabled', async () => {
|
||||
let commitment = 42;
|
||||
(await mixer.isDepositsEnabled()).should.be.equal(true)
|
||||
const err = await mixer.toggleDeposits({ from: accounts[1] }).should.be.rejected
|
||||
err.reason.should.be.equal('unauthorized')
|
||||
await mixer.toggleDeposits({ from: sender });
|
||||
(await mixer.isDepositsEnabled()).should.be.equal(false)
|
||||
let error = await mixer.deposit(commitment, { value, from: sender }).should.be.rejected
|
||||
error.reason.should.be.equal('deposits disabled')
|
||||
})
|
||||
|
||||
it('should throw if there is a such commitment', async () => {
|
||||
const commitment = 42
|
||||
await mixer.deposit(commitment, { value, from: sender }).should.be.fulfilled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue