mirror of
https://gitee.com/BDWare/common
synced 2025-04-27 22:42:19 +00:00
fix: fix bugs in signature of ContractRequest
add ContractRequest.parseArg to handle the type of arg
This commit is contained in:
parent
4bbe861fcc
commit
654ec47663
@ -138,11 +138,19 @@ public class ContractRequest extends SM2Verifiable
|
|||||||
"%s|%s|%s%s|%s",
|
"%s|%s|%s%s|%s",
|
||||||
(contractDOI != null && contractDOI.length() > 0) ? contractDOI : contractID,
|
(contractDOI != null && contractDOI.length() > 0) ? contractDOI : contractID,
|
||||||
action,
|
action,
|
||||||
arg.getAsString(),
|
parseArg(),
|
||||||
gasLimit > 0 ? "|" + gasLimit : "",
|
gasLimit > 0 ? "|" + gasLimit : "",
|
||||||
requester);
|
requester);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String parseArg() {
|
||||||
|
try {
|
||||||
|
return arg.getAsString();
|
||||||
|
} catch (Exception e) {
|
||||||
|
return arg.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public byte[] toByte() {
|
public byte[] toByte() {
|
||||||
try {
|
try {
|
||||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user