fix infinity values in LetsExchange fixed rate (#1849)

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>

Serhii committed Dec 3, 2024 at 00:26 UTC 3e1cb3905e9e2843860326e5748cb67d801cf078
1 file changed +2
lib/exchange/provider/letsexchange_exchange_provider.dart
+2
@@ -97,6 +97,8 @@ class LetsExchangeExchangeProvider extends ExchangeProvider {
97
98 final amountToGet = double.tryParse(responseJSON['amount'] as String) ?? 0.0;
99
100 + if (amountToGet == 0.0) return 0.0;
101 +
102 return isFixedRateMode ? amount / amountToGet : amountToGet / amount;
103 } catch (e) {
104 log(e.toString());