From cffd9bf8fdb5ba05a73e22b2c7de47149a830d09 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 2 Aug 2022 09:48:34 +0200 Subject: [PATCH] use latest code to parse input parameters --- libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx index 06ccd60f2e..c5f6f394ce 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx @@ -138,12 +138,10 @@ export function ContractGUI (props: ContractGUIProps) { } const makeMultiVal = () => { - let inputString = basicInput + const inputString = basicInput if (inputString) { - inputString = inputString.replace(/(^|,\s+|,)(\d+)(\s+,|,|$)/g, '$1"$2"$3') // replace non quoted number by quoted number - inputString = inputString.replace(/(^|,\s+|,)(0[xX][0-9a-fA-F]+)(\s+,|,|$)/g, '$1"$2"$3') // replace non quoted hex string by quoted hex string - const inputJSON = JSON.parse('[' + inputString + ']') + const inputJSON = remixLib.execution.txFormat.parseFunctionParams(inputString) const multiInputs = multiFields.current for (let k = 0; k < multiInputs.length; k++) {