Skip to content

Commit d263482

Browse files
authored
setNumericValue according to type (#238)
1 parent f0befcb commit d263482

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sdk-abi/src/main/java/org/fisco/bcos/sdk/abi/wrapper/ABIObject.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,11 @@ public void setBoolValue(Bool boolValue) {
633633

634634
public void setNumericValue(NumericType numericValue) {
635635
this.type = ObjectType.VALUE;
636-
this.valueType = ValueType.UINT;
636+
if (numericValue.getTypeAsString().startsWith("int") || numericValue instanceof Int256) {
637+
this.valueType = ValueType.INT;
638+
} else {
639+
this.valueType = ValueType.UINT;
640+
}
637641
this.numericValue = numericValue;
638642
}
639643

0 commit comments

Comments
 (0)