actually use price interval

This commit is contained in:
julian 2023-06-30 15:30:33 -06:00
parent 7b160b9a55
commit bd5a0c1631

View file

@ -80,7 +80,7 @@ class PriceAPI {
{required String baseCurrency}) async { {required String baseCurrency}) async {
final now = DateTime.now(); final now = DateTime.now();
if (_lastUsedBaseCurrency != baseCurrency || if (_lastUsedBaseCurrency != baseCurrency ||
now.difference(_lastCalled).inSeconds > 0) { now.difference(_lastCalled) > refreshIntervalDuration) {
_lastCalled = now; _lastCalled = now;
_lastUsedBaseCurrency = baseCurrency; _lastUsedBaseCurrency = baseCurrency;
} else { } else {