diff --git a/src/main/java/com/sparrowwallet/drongo/BitcoinUnit.java b/src/main/java/com/sparrowwallet/drongo/BitcoinUnit.java index b067c87..a1e9de7 100644 --- a/src/main/java/com/sparrowwallet/drongo/BitcoinUnit.java +++ b/src/main/java/com/sparrowwallet/drongo/BitcoinUnit.java @@ -17,7 +17,7 @@ public enum BitcoinUnit { BTC("BTC") { @Override public long getSatsValue(double unitValue) { - return (long)(unitValue * Transaction.SATOSHIS_PER_BITCOIN); + return Math.round(unitValue * Transaction.SATOSHIS_PER_BITCOIN); } @Override