From ac045bcef5c9e4aa4703ec7999d6cadffa9fea8e Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 17 Jan 2024 15:41:37 +0100 Subject: [PATCH] Fixed input parsing for computing a witness --- apps/circuit-compiler/src/app/components/witness.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/circuit-compiler/src/app/components/witness.tsx b/apps/circuit-compiler/src/app/components/witness.tsx index 3b45b52ea4..86e933148b 100644 --- a/apps/circuit-compiler/src/app/components/witness.tsx +++ b/apps/circuit-compiler/src/app/components/witness.tsx @@ -12,7 +12,9 @@ export function WitnessSection ({ plugin, signalInputs, status }: {plugin: Circo let value = e.target.value try { - value = JSON.parse(JSON.stringify(value, (key, value) => typeof value === 'bigint' ? value.toString() : value)) + value = JSON.parse(value) + + if (!Array.isArray(value)) throw new Error('Invalid JSON') } catch (e) { // do nothing }