mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
fix infinity values in LetsExchange fixed rate (#1849)
Some checks are pending
Cache Dependencies / test (push) Waiting to run
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:
parent
5b162c54da
commit
3e1cb3905e
1 changed files with 2 additions and 0 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue