From 3e85f0af5145be288fef49f98a721561bbbacc5d Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 4 Aug 2016 13:02:04 +0200 Subject: [PATCH] Add precision to currency json --- core/src/main/java/io/bitsquare/locale/CurrencyTuple.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyTuple.java b/core/src/main/java/io/bitsquare/locale/CurrencyTuple.java index a124acd7b3..350f98b0b0 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyTuple.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyTuple.java @@ -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; } }