From 87e466bd81083dda860c1d801a9387a5dc07cfb3 Mon Sep 17 00:00:00 2001 From: "Frank.R.Wu" Date: Sun, 12 Dec 2021 11:29:15 +0800 Subject: [PATCH] merge merge ContractRequest from :common --- src/main/sdk/org/bdware/client/ContractRequest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/sdk/org/bdware/client/ContractRequest.java b/src/main/sdk/org/bdware/client/ContractRequest.java index 1d6ec37..4161341 100644 --- a/src/main/sdk/org/bdware/client/ContractRequest.java +++ b/src/main/sdk/org/bdware/client/ContractRequest.java @@ -138,11 +138,19 @@ public class ContractRequest extends SM2Verifiable "%s|%s|%s%s|%s", (contractDOI != null && contractDOI.length() > 0) ? contractDOI : contractID, action, - arg, + parseArg(), gasLimit > 0 ? "|" + gasLimit : "", requester); } + private String parseArg() { + try { + return arg.getAsString(); + } catch (Exception e) { + return arg.toString(); + } + } + public byte[] toByte() { try { ByteArrayOutputStream out = new ByteArrayOutputStream();