minima-global / Minima

The Minima protocol Java libraries and application
Apache License 2.0
129 stars 146 forks source link

parse txnstate value as string even if it looks like a valid JSON array #595

Open mihbor opened 1 year ago

mihbor commented 1 year ago

Fix error when the txnstate value is interpreted as a JSON array (e.g. a number in bracket to turn it into a string: [123]) and throwing this:

ClassCastException: class org.minima.utils.json.JSONArray cannot be cast to class java.lang.String
org.minima.system.commands.Command.getParam(Command.java:205)
org.minima.system.commands.txn.txnstate.runCommand(txnstate.java:59)