fix rounding issue when converting btc values to sats

This commit is contained in:
Craig Raw 2021-10-28 13:52:18 +02:00
parent 434c18ef0a
commit 360550a718

View file

@ -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