Refactor ForexRateApiService to remove API key dependency and update README and launch configurations

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-20 10:40:28 +01:00
parent b37dec35f5
commit 67af59bd0d
9 changed files with 82 additions and 136 deletions
+3 -3
View File
@@ -31,18 +31,18 @@ class _FakeStorageService extends StorageService {
}
}
class _FakeExchangeService extends ForexRateApiService {
class _FakeExchangeService extends FrankfurterApiService {
_FakeExchangeService({required this.quote})
: super(httpClient: http.Client(), apiKey: 'test-key');
final double quote;
@override
Future<ForexConversionResult> convertUsdToSek({
Future<ConversionResult> convertUsdToSek({
required DateTime estDate,
required double amount,
}) async {
return ForexConversionResult(quote: quote, result: quote * amount);
return ConversionResult(quote: quote, result: quote * amount);
}
}