From aef16eda5fe44ecd43597db1a4ccb9c0621c4757 Mon Sep 17 00:00:00 2001 From: gozzy Date: Wed, 22 Mar 2023 10:03:27 +0000 Subject: [PATCH] factor for invalid proposal json --- store/governance/gov.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/store/governance/gov.js b/store/governance/gov.js index 933d6df..9d21618 100644 --- a/store/governance/gov.js +++ b/store/governance/gov.js @@ -688,6 +688,13 @@ const actions = { } } + if (text.includes(`'`)) { + text = text.replaceAll(`'`, `"`) + } + if (text.includes(`" "`)) { + text = text.replace(`" "`, `", "`) + } + let title, description, rest try { ;({ title, description } = JSON.parse(text))