fix infinity values in LetsExchange fixed rate (#1849)
Some checks are pending
Cache Dependencies / test (push) Waiting to run

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
Serhii 2024-12-03 00:26:33 +02:00 committed by GitHub
parent 5b162c54da
commit 3e1cb3905e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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());