mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-25 09:36:44 +00:00
fix rounding issue when converting btc values to sats
This commit is contained in:
parent
434c18ef0a
commit
360550a718
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ public enum BitcoinUnit {
|
||||||
BTC("BTC") {
|
BTC("BTC") {
|
||||||
@Override
|
@Override
|
||||||
public long getSatsValue(double unitValue) {
|
public long getSatsValue(double unitValue) {
|
||||||
return (long)(unitValue * Transaction.SATOSHIS_PER_BITCOIN);
|
return Math.round(unitValue * Transaction.SATOSHIS_PER_BITCOIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue