diff --git a/lib/reactions/fiat_rate_update.dart b/lib/reactions/fiat_rate_update.dart index 4d9722ad0..e9f21f991 100644 --- a/lib/reactions/fiat_rate_update.dart +++ b/lib/reactions/fiat_rate_update.dart @@ -29,13 +29,6 @@ Future startFiatRateUpdate( if (appStore.wallet!.type == WalletType.haven) { await updateHavenRate(fiatConversionStore); - } else if (appStore.wallet!.type == WalletType.lightning) { - fiatConversionStore.prices[appStore.wallet!.currency] = - await FiatConversionService.fetchPrice( - crypto: appStore.wallet!.currency, - fiat: settingsStore.fiatCurrency, - torOnly: settingsStore.fiatApiMode == FiatApiMode.torOnly) / - 100000000; } else { fiatConversionStore.prices[appStore.wallet!.currency] = await FiatConversionService.fetchPrice( @@ -61,7 +54,7 @@ Future startFiatRateUpdate( } if (appStore.wallet!.type == WalletType.lightning) { - currencies = [CryptoCurrency.btc]; + currencies = [CryptoCurrency.btc, CryptoCurrency.btcln]; } if (currencies != null) { @@ -75,10 +68,9 @@ Future startFiatRateUpdate( } } - if (appStore.wallet!.type == WalletType.lightning) { - fiatConversionStore.prices[CryptoCurrency.btcln] = - (fiatConversionStore.prices[CryptoCurrency.btc] ?? 0) / 100000000; - } + // keep btcln price in sync with btc: + fiatConversionStore.prices[CryptoCurrency.btcln] = + (fiatConversionStore.prices[CryptoCurrency.btc] ?? 0) / 100000000; } catch (e) { print(e); }