Fix incorrect amount parsing due to bytes approximation

This commit is contained in:
OmarHatem
2023-02-15 23:16:21 +02:00
parent 13ee217502
commit 5abbc8f4dd
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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;
}