|
|
|
@ -12,9 +12,18 @@ export function WitnessSection ({ plugin, signalInputs, status }: {plugin: Circo |
|
|
|
|
let value = e.target.value |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
value = JSON.parse(value) |
|
|
|
|
|
|
|
|
|
if (!Array.isArray(value)) throw new Error('Invalid JSON') |
|
|
|
|
value = JSON.parse(JSON.stringify(value, (key, value) => { |
|
|
|
|
if (typeof value === 'bigint') { |
|
|
|
|
return value.toString() |
|
|
|
|
} else { |
|
|
|
|
try { |
|
|
|
|
const parsedValue = JSON.parse(value) |
|
|
|
|
|
|
|
|
|
return Array.isArray(parsedValue) ? parsedValue : value |
|
|
|
|
} catch (e) { |
|
|
|
|
return value |
|
|
|
|
} |
|
|
|
|
}})) |
|
|
|
|
} catch (e) { |
|
|
|
|
// do nothing
|
|
|
|
|
} |
|
|
|
|