Fixed parsing witness inputs

pull/5370/head
ioedeveloper 11 months ago committed by Aniket
parent 5ba5f54155
commit 657cdf08f9
  1. 9
      apps/circuit-compiler/src/app/components/witness.tsx

@ -9,9 +9,16 @@ export function WitnessSection ({ plugin, signalInputs, status }: {plugin: Circo
const [witnessValues, setWitnessValues] = useState<Record<string, string>>({})
const handleSignalInput = (e: any) => {
let value = e.target.value
try {
value = JSON.parse(value)
} catch (e) {
// do nothing
}
setWitnessValues({
...witnessValues,
[e.target.name]: e.target.value
[e.target.name]: value
})
}

Loading…
Cancel
Save