Fix duplicate ID

This commit is contained in:
incrypto32 2022-05-05 23:10:59 +05:30 committed by Danil Kovtonyuk
parent 81fb2a2e73
commit 45e72375b4
1 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ import {
export function handleCommitment(event: NewCommitment): void {
let entity = new Commitment(
event.transaction.from.toHex() + "-" + event.logIndex.toString()
event.transaction.hash.toHex() + "-" + event.logIndex.toString()
);
entity.index = event.params.index;
@ -21,7 +21,7 @@ export function handleCommitment(event: NewCommitment): void {
export function handleNullifier(event: NewNullifier): void {
let entity = new Nullifier(
event.transaction.from.toHex() + "-" + event.logIndex.toString()
event.transaction.hash.toHex() + "-" + event.logIndex.toString()
);
entity.nullifier = event.params.nullifier;