Skip to content

Commit

Permalink
Merge pull request #6229 from jmacxx/upgrade_pricenode_xchange_5-0-13
Browse files Browse the repository at this point in the history
Pricenode upgrade to XChange 5.0.13
  • Loading branch information
ripcurlx authored May 31, 2022
2 parents ad15fcd + 1c9aff0 commit 4540056
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 149 deletions.
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()));
}

}

0 comments on commit 4540056

Please sign in to comment.