Replacing BISQ_ENABLED with NETWORK === "bisq"

This commit is contained in:
softsimon 2020-10-15 11:37:25 +07:00
parent b767a0a33e
commit d8857f1073
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7

View File

@ -94,7 +94,7 @@ class Server {
fiatConversion.startService(); fiatConversion.startService();
diskCache.loadMempoolCache(); diskCache.loadMempoolCache();
if (config.BISQ_ENABLED) { if (config.NETWORK === 'bisq') {
bisq.startBisqService(); bisq.startBisqService();
bisq.setPriceCallbackFunction((price) => websocketHandler.setExtraInitProperties('bsq-price', price)); bisq.setPriceCallbackFunction((price) => websocketHandler.setExtraInitProperties('bsq-price', price));
blocks.setNewBlockCallback(bisq.handleNewBitcoinBlock.bind(bisq)); blocks.setNewBlockCallback(bisq.handleNewBitcoinBlock.bind(bisq));
@ -146,7 +146,7 @@ class Server {
.get(config.API_ENDPOINT + 'backend-info', routes.getBackendInfo) .get(config.API_ENDPOINT + 'backend-info', routes.getBackendInfo)
; ;
if (config.BISQ_ENABLED) { if (config.NETWORK === 'bisq') {
this.app this.app
.get(config.API_ENDPOINT + 'bisq/stats', routes.getBisqStats) .get(config.API_ENDPOINT + 'bisq/stats', routes.getBisqStats)
.get(config.API_ENDPOINT + 'bisq/tx/:txId', routes.getBisqTransaction) .get(config.API_ENDPOINT + 'bisq/tx/:txId', routes.getBisqTransaction)