fix infinity values in LetsExchange fixed rate (#1849)

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
Serhii
2024-12-03 01:26:33 +03:00
committed by GitHub
co-authored by Omar Hatem
parent 5b162c54da
commit 3e1cb3905e
@@ -97,6 +97,8 @@ class LetsExchangeExchangeProvider extends ExchangeProvider {
final amountToGet = double.tryParse(responseJSON['amount'] as String) ?? 0.0;
if (amountToGet == 0.0) return 0.0;
return isFixedRateMode ? amount / amountToGet : amountToGet / amount;
} catch (e) {
log(e.toString());