Restore FiatConversionService network error handling (#3684)

This commit is contained in:
claude[bot]
2026-10-06 17:12:25 +02:00
committed by GitHub
parent c6f5865a9b
commit f8a992ce03
+7 -2
View File
@@ -14,8 +14,9 @@ class FiatConversionService {
required CryptoCurrency crypto,
required FiatCurrency fiat,
required bool torOnly,
}) async =>
double.parse((await PriceApiClient.getLatestPrice(
}) async {
try {
return double.parse((await PriceApiClient.getLatestPrice(
LatestPriceRequest(
from: _overrideCryptoCurrency(crypto),
to: fiat,
@@ -25,4 +26,8 @@ class FiatConversionService {
?.quote
.toString() ??
"0");
} catch (e) {
return 0.0;
}
}
}