Skip to content

Commit

Permalink
Revert some unnecessary changes made by automated code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
badgerwithagun committed Dec 14, 2018
1 parent 833c216 commit f47b2cf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public Completable connect(ProductSubscription... args) {
if (args == null || args.length == 0)
throw new UnsupportedOperationException("The ProductSubscription must be defined!");
ExchangeSpecification exchangeSpec = getExchangeSpecification();
streamingService = new CoinbaseProStreamingService(API_URI, () -> authData(exchangeSpec));
streamingMarketDataService = new CoinbaseProStreamingMarketDataService(streamingService);
this.streamingService = new CoinbaseProStreamingService(API_URI, () -> authData(exchangeSpec));
this.streamingMarketDataService = new CoinbaseProStreamingMarketDataService(streamingService);
streamingService.subscribeMultipleCurrencyPairs(args);

return streamingService.connect();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void setChannelInactiveHandler(WebSocketClientHandler.WebSocketMessageHan
}

public void subscribeMultipleCurrencyPairs(ProductSubscription... products) {
product = products[0];
this.product = products[0];
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ private void generateSubscriptionMessage(ProductSubscription productSubscription
this.channels = channels.toArray(new CoinbaseProProductSubsctiption[channels.size()]);

if ( authData != null ) {
key = authData.getKey();
passphrase = authData.getPassphrase();
signature = authData.getSignature();
timestamp = String.valueOf(authData.getTimestamp());
this.key = authData.getKey();
this.passphrase = authData.getPassphrase();
this.signature = authData.getSignature();
this.timestamp = String.valueOf(authData.getTimestamp());
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package info.bitrich.xchangestream.coinbasepro;

import info.bitrich.xchangestream.core.ProductSubscription;
import info.bitrich.xchangestream.core.StreamingExchange;
import info.bitrich.xchangestream.core.StreamingExchangeFactory;
import org.knowm.xchange.currency.CurrencyPair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import info.bitrich.xchangestream.core.ProductSubscription;
import info.bitrich.xchangestream.core.StreamingExchange;
import info.bitrich.xchangestream.core.StreamingExchangeFactory;

public class CoinbaseProManualExample {
private static final Logger LOG = LoggerFactory.getLogger(CoinbaseProManualExample.class);

Expand Down Expand Up @@ -36,5 +37,7 @@ public static void main(String[] args) {
} catch (InterruptedException e) {
e.printStackTrace();
}

exchange.disconnect().blockingAwait();
}
}

0 comments on commit f47b2cf

Please sign in to comment.