mirror of
https://github.com/tornadocash/tornado-core.git
synced 2024-10-01 01:06:17 -04:00
cli fix
This commit is contained in:
parent
35fdb50e3a
commit
234fb8940e
4
cli.js
4
cli.js
@ -41,8 +41,8 @@ async function withdraw(note, receiver) {
|
||||
const validRoot = await mixer.methods.isKnownRoot(await tree.root()).call();
|
||||
assert(validRoot === true);
|
||||
|
||||
const leafIndex = leaves.indexOf(deposit.commitment.toString());
|
||||
assert(leafIndex > 0);
|
||||
const leafIndex = leaves.map(el => el.toString()).indexOf(deposit.commitment.toString());
|
||||
assert(leafIndex >= 0);
|
||||
const {root, path_elements, path_index} = await tree.path(leafIndex);
|
||||
// Circuit input
|
||||
const input = {
|
||||
|
Loading…
Reference in New Issue
Block a user