Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pricenode upgrade to XChange 5.0.13 #6229

Merged
merged 1 commit into from May 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ configure(subprojects) {
junitVersion = '4.12'
jupiterVersion = '5.7.0'
kotlinVersion = '1.3.41'
knowmXchangeVersion = '4.4.2'
knowmXchangeVersion = '5.0.13'
langVersion = '3.11'
logbackVersion = '1.1.11'
loggingVersion = '1.2'
Expand Down Expand Up @@ -606,6 +606,7 @@ configure(project(':pricenode')) {
implementation("org.knowm.xchange:xchange-bitstamp:$knowmXchangeVersion")
implementation("org.knowm.xchange:xchange-btcmarkets:$knowmXchangeVersion")
implementation("org.knowm.xchange:xchange-cexio:$knowmXchangeVersion")
implementation("org.knowm.xchange:xchange-coinbasepro:$knowmXchangeVersion")
implementation("org.knowm.xchange:xchange-coinmarketcap:$knowmXchangeVersion")
implementation("org.knowm.xchange:xchange-coinmate:$knowmXchangeVersion")
implementation("org.knowm.xchange:xchange-coinone:$knowmXchangeVersion")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/

package bisq.price.spot.providers;

import bisq.price.spot.ExchangeRate;
import bisq.price.spot.ExchangeRateProvider;

import org.knowm.xchange.bitbay.BitbayExchange;
import org.knowm.xchange.coinbasepro.CoinbaseProExchange;

import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
Expand All @@ -30,16 +29,21 @@
import java.util.Set;

@Component
class Bitbay extends ExchangeRateProvider {
class CoinbasePro extends ExchangeRateProvider {

public Bitbay(Environment env) {
super(env, "BITBAY", "bitbay", Duration.ofMinutes(1));
public CoinbasePro(Environment env) {
super(env, "COINBASEPRO", "coinbasepro", Duration.ofMinutes(1));
}

@Override
public Set<ExchangeRate> doGet() {
// Supported fiat: EUR, GBP, PLN, USD
// Supported alts: DASH, ETH, LTC
return doGet(BitbayExchange.class);
// Supported fiat: EUR, USD, GBP
// Supported alts: DASH, DOGE, ETC, ETH, LTC, ZEC, ZEN
return doGet(CoinbaseProExchange.class);
}

@Override
protected boolean requiresFilterDuringBulkTickerRetrieval() {
return true;
}
}
102 changes: 0 additions & 102 deletions pricenode/src/main/java/bisq/price/spot/providers/Coinpaprika.java

This file was deleted.

36 changes: 0 additions & 36 deletions pricenode/src/test/java/bisq/price/spot/providers/BitbayTest.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
import org.junit.jupiter.api.Test;

@Slf4j
public class CoinpaprikaTest extends AbstractExchangeRateProviderTest {
public class CoinbaseProTest extends AbstractExchangeRateProviderTest {

@Test
public void doGet_successfulCall() {
doGet_successfulCall(new Coinpaprika(new StandardEnvironment()));
doGet_successfulCall(new CoinbasePro(new StandardEnvironment()));
}

}