diff --git a/src/main/java/de/bitsharesmunich/graphenej/Asset.java b/src/main/java/de/bitsharesmunich/graphenej/Asset.java index accc93d..a242218 100644 --- a/src/main/java/de/bitsharesmunich/graphenej/Asset.java +++ b/src/main/java/de/bitsharesmunich/graphenej/Asset.java @@ -15,7 +15,7 @@ public class Asset extends GrapheneObject { public static final String KEY_DYNAMIC_ASSET_DATA_ID = "dynamic_asset_data_id"; private String symbol; - private int precision; + private int precision = -1; private String issuer; private String description; private String dynamic_asset_data_id; @@ -83,6 +83,20 @@ public class Asset extends GrapheneObject { return description; } + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public boolean equals(Object other) { + if(other instanceof Asset){ + return this.getObjectId().equals(((Asset)other).getObjectId()); + }else{ + return false; + } + } + /** * Custom deserializer used to instantiate a simple version of the Asset class from the response of the * 'lookup_asset_symbols' API call.