mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
Fix incorrect amount parsing due to bytes approximation
This commit is contained in:
@@ -17,7 +17,7 @@ int stringDoubleToBitcoinAmount(String amount) {
|
||||
int result = 0;
|
||||
|
||||
try {
|
||||
result = (double.parse(amount) * bitcoinAmountDivider).toInt();
|
||||
result = (double.parse(amount) * bitcoinAmountDivider).round();
|
||||
} catch (e) {
|
||||
result = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user