Add precision to currency json

This commit is contained in:
Manfred Karrer 2016-08-04 13:02:04 +02:00
parent c70541d29f
commit 3e85f0af51

View File

@ -24,9 +24,17 @@ public class CurrencyTuple implements Serializable {
public final String code;
public final String name;
public final int precision; // precision 4 is 1/10000 -> 0.0001 is smallest unit
public CurrencyTuple(String code, String name) {
// We use Fiat class and there precision is 4
// In future we might add custom precision per currency
this(code, name, 4);
}
public CurrencyTuple(String code, String name, int precision) {
this.code = code;
this.name = name;
this.precision = precision;
}
}