mirror of
https://github.com/tornadocash/tornado-relayer.git
synced 2025-08-06 05:14:26 -04:00
fix isKnownContract validation
This commit is contained in:
parent
ed9f003d50
commit
ecdcb545fc
4 changed files with 26 additions and 12 deletions
|
@ -15,7 +15,13 @@ describe('Validator', () => {
|
|||
'.proof should match pattern "^0x[a-fA-F0-9]{512}$"',
|
||||
)
|
||||
})
|
||||
|
||||
it('should throw if unknown contract', () => {
|
||||
const malformedData = { ...withdrawData }
|
||||
malformedData.contract = '0xf17f52151ebef6c7334fad080c5704d77216b732'
|
||||
getTornadoWithdrawInputError(malformedData).should.be.equal(
|
||||
'.contract should pass "isKnownContract" keyword validation',
|
||||
)
|
||||
})
|
||||
it('should throw something is missing', () => {
|
||||
const malformedData = { ...withdrawData }
|
||||
delete malformedData.proof
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue