File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
src/main/java/multichain/object/queryobjects Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 1515
1616/**
1717 * @author Ub - H. MARTEAU
18- * @version 4.7
18+ * @version 4.17
1919 */
2020public class RawParam extends GsonFormatters {
2121 String address ;
22- float amount = 0 ;
22+ float amount = - 1 ;
2323 List <AssetQuantity > assets ;
2424
2525 /**
@@ -48,7 +48,7 @@ public boolean isFilled() {
4848 if (address == null || "" .equals (address )) {
4949 return false ;
5050 }
51- if (amount != 0. 0 ) {
51+ if (amount >= 0 ) {
5252 return true ;
5353 } else {
5454 if (assets == null || assets .size () == 0 ) {
@@ -64,18 +64,18 @@ public boolean isFilled() {
6464 }
6565
6666 public Object getValue () {
67- if (amount != 0.0 ) {
68- return amount ;
69- } else {
70- Map <String , Float > filledAssets = new HashMap <String , Float >();
71- if (assets != null && assets .size () != 0 ) {
72- for (AssetQuantity asset : assets ) {
73- if (asset .isFilled ()) {
74- filledAssets .put (asset .getName (), new Float (asset .getQuantity ()));
75- }
67+ Map <String , Float > filledAssets = new HashMap <String , Float >();
68+ if (assets != null && assets .size () != 0 ) {
69+ for (AssetQuantity asset : assets ) {
70+ if (asset .isFilled ()) {
71+ filledAssets .put (asset .getName (), new Float (asset .getQuantity ()));
7672 }
7773 }
74+ }
75+ if (filledAssets .size () > 0 ) {
7876 return filledAssets ;
77+ } else {
78+ return amount ;
7979 }
8080 }
8181
You can’t perform that action at this time.
0 commit comments