Revamping configuration file.

fixes #141
This commit is contained in:
softsimon
2020-10-19 11:57:02 +07:00
parent 4e4a6f6c59
commit e2a7683828
17 changed files with 218 additions and 146 deletions

View File

@@ -1,4 +1,4 @@
const config = require('../mempool-config.json');
import config from './config';
import * as dgram from 'dgram';
class Logger {
@@ -79,11 +79,11 @@ class Logger {
}
private getNetwork(): string {
if (config.BISQ_ENABLED) {
if (config.BISQ_BLOCKS.ENABLED) {
return 'bisq';
}
if (config.NETWORK && config.NETWORK !== 'mainnet') {
return config.NETWORK;
if (config.MEMPOOL.NETWORK && config.MEMPOOL.NETWORK !== 'mainnet') {
return config.MEMPOOL.NETWORK;
}
return '';
}