Fixing potential serialization bug for the TransferOperation when no fee is specified
This commit is contained in:
parent
89a7a1423c
commit
b543a1c36d
1 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,6 @@ import java.lang.reflect.Type;
|
|||
|
||||
/**
|
||||
* Class used to encapsulate the TransferOperation operation related functionalities.
|
||||
* TODO: Add extensions support
|
||||
*/
|
||||
public class TransferOperation extends BaseOperation {
|
||||
public static final String KEY_FEE = "fee";
|
||||
|
@ -86,6 +85,7 @@ public class TransferOperation extends BaseOperation {
|
|||
JsonArray array = new JsonArray();
|
||||
array.add(this.getId());
|
||||
JsonObject jsonObject = new JsonObject();
|
||||
if(fee != null)
|
||||
jsonObject.add(KEY_FEE, fee.toJsonObject());
|
||||
jsonObject.addProperty(KEY_FROM, from.toJsonString());
|
||||
jsonObject.addProperty(KEY_TO, to.toJsonString());
|
||||
|
|
Loading…
Reference in a new issue