From 72b7ba37371ce460d78daefcc49bbf91e2ad6dfc Mon Sep 17 00:00:00 2001 From: Kolezhniuk Date: Fri, 7 Apr 2023 11:03:40 +0200 Subject: [PATCH] Error: empty JSON-LD query value, in ValueProof.validate when value is 0 --- src/circuits/models.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/circuits/models.ts b/src/circuits/models.ts index 8721cd9a..f86ada08 100644 --- a/src/circuits/models.ts +++ b/src/circuits/models.ts @@ -203,10 +203,10 @@ export class ValueProof { * */ validate(): void { - if (!this.path) { + if (typeof this.path !== 'bigint') { throw new Error(CircuitError.EmptyJsonLDQueryPath); } - if (!this.value) { + if (typeof this.value !== 'bigint') { throw new Error(CircuitError.EmptyJsonLDQueryValue); } if (!this.mtp) {