mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2026-08-10 16:43:14 +00:00
add user agent to coingecko exchange source request
This commit is contained in:
@@ -3,6 +3,7 @@ package com.sparrowwallet.sparrow.net;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.sparrowwallet.sparrow.AppServices;
|
||||
import com.sparrowwallet.sparrow.SparrowWallet;
|
||||
import com.sparrowwallet.sparrow.event.ExchangeRatesUpdatedEvent;
|
||||
import com.sparrowwallet.tern.http.client.HttpResponseException;
|
||||
import javafx.concurrent.ScheduledService;
|
||||
@@ -151,7 +152,7 @@ public enum ExchangeSource {
|
||||
|
||||
HttpClientService httpClientService = AppServices.getHttpClientService();
|
||||
try {
|
||||
return httpClientService.requestJson(url, CoinGeckoRates.class, null);
|
||||
return httpClientService.requestJson(url, CoinGeckoRates.class, Map.of("User-Agent", "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1)", "Accept", "*/*"));
|
||||
} catch(Exception e) {
|
||||
if(log.isDebugEnabled()) {
|
||||
log.warn("Error retrieving currency rates", e);
|
||||
|
||||
Reference in New Issue
Block a user