Skip to content

Commit

Permalink
ExchangeRateService: Filter by provider names with startsWith
Browse files Browse the repository at this point in the history
  • Loading branch information
alvasw committed Sep 17, 2023
1 parent 0f36651 commit 8068ce7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/bisq/price/spot/ExchangeRateService.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private Map<String, Object> getMetadata(ExchangeRateProvider provider) {

private long getTimestamp(ExchangeRateProvider provider, Set<ExchangeRate> exchangeRates) {
return exchangeRates.stream()
.filter(e -> provider.getName().equals(e.getProvider()))
.filter(e -> e.getProvider().startsWith(provider.getName()))
.findFirst()
.orElseThrow(() -> new IllegalStateException("No exchange rate data found for " + provider.getName()))
.getTimestamp();
Expand Down

0 comments on commit 8068ce7

Please sign in to comment.