Skip to content

Commit

Permalink
CryptoYaMarketData: Rename averageBlueRate to averagedArsBlueRateFrom…
Browse files Browse the repository at this point in the history
…Last24Hours
  • Loading branch information
alvasw committed Sep 1, 2023
1 parent 722f886 commit 97de12e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/bisq/price/spot/providers/CryptoYa.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public CryptoYa(Environment env) {
public Set<ExchangeRate> doGet() {
Set<ExchangeRate> result = new HashSet<>();
String key = "ARS";
Double rate = fetchArsBlueMarketData().averageBlueRate();
Double rate = fetchArsBlueMarketData().averagedArsBlueRateFromLast24Hours();
if (rate > 0.0d) {
result.add(new ExchangeRate(
key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class CryptoYaMarketData {
* @return the avg ask price from all the exchanges that have updated ask prices (not older than 1 day)
* if no market data available returns 0
*/
public Double averageBlueRate() {
public Double averagedArsBlueRateFromLast24Hours() {
// filter more than 1 day old values with yesterday UTC timestamp
Long yesterdayTimestamp = Instant.now().minus(1, ChronoUnit.DAYS).getEpochSecond();
return streamLatestAvailableMarkets(yesterdayTimestamp).mapToDouble(CryptoYaTicker::getAsk)
Expand Down

0 comments on commit 97de12e

Please sign in to comment.