|
|
|
@ -12,11 +12,21 @@ export function WitnessSection ({ plugin, signalInputs, status }: {plugin: Circo |
|
|
|
|
const handleSignalInput = (e: any) => { |
|
|
|
|
let value = e.target.value |
|
|
|
|
|
|
|
|
|
if (value.startsWith('[') && value.endsWith(']')) { |
|
|
|
|
try { |
|
|
|
|
value = remixLib.execution.txFormat.parseFunctionParams(value) |
|
|
|
|
} catch (e) { |
|
|
|
|
// do nothing
|
|
|
|
|
} |
|
|
|
|
} else if (value.startsWith('[') && !value.endsWith(']')) { |
|
|
|
|
// do nothing
|
|
|
|
|
} else { |
|
|
|
|
try { |
|
|
|
|
value = remixLib.execution.txFormat.parseFunctionParams(value) |
|
|
|
|
} catch (e) { |
|
|
|
|
// do nothing
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
setWitnessValues({ |
|
|
|
|
...witnessValues, |
|
|
|
|
[e.target.name]: value[0] |
|
|
|
|