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();
|
const validRoot = await mixer.methods.isKnownRoot(await tree.root()).call();
|
||||||
assert(validRoot === true);
|
assert(validRoot === true);
|
||||||
|
|
||||||
const leafIndex = leaves.indexOf(deposit.commitment.toString());
|
const leafIndex = leaves.map(el => el.toString()).indexOf(deposit.commitment.toString());
|
||||||
assert(leafIndex > 0);
|
assert(leafIndex >= 0);
|
||||||
const {root, path_elements, path_index} = await tree.path(leafIndex);
|
const {root, path_elements, path_index} = await tree.path(leafIndex);
|
||||||
// Circuit input
|
// Circuit input
|
||||||
const input = {
|
const input = {
|
||||||
|
Loading…
Reference in New Issue
Block a user