mirror of
https://github.com/Permissionless-Software-Foundation/bch-dex.git
synced 2026-09-21 16:52:00 -07:00
Merge pull request #4 from Permissionless-Software-Foundation/ct-unstable
fix(config): Adding env var for signaling circuit relay
This commit is contained in:
Vendored
+11
-1
@@ -3,10 +3,20 @@
|
||||
environments.
|
||||
*/
|
||||
|
||||
/* eslint no-unneeded-ternary:0 */
|
||||
|
||||
module.exports = {
|
||||
// Configure TCP port.
|
||||
port: process.env.PORT || 5001,
|
||||
|
||||
// Password for HTML UI that displays logs.
|
||||
logPass: 'test',
|
||||
|
||||
// Email server settings if nodemailer email notifications are used.
|
||||
emailServer: process.env.EMAILSERVER ? process.env.EMAILSERVER : 'mail.someserver.com',
|
||||
emailUser: process.env.EMAILUSER ? process.env.EMAILUSER : 'noreply@someserver.com',
|
||||
emailPassword: process.env.EMAILPASS ? process.env.EMAILPASS : 'emailpassword'
|
||||
emailPassword: process.env.EMAILPASS ? process.env.EMAILPASS : 'emailpassword',
|
||||
|
||||
// IPFS settings.
|
||||
isCircuitRelay: process.env.ENABLE_CIRCUIT_RELAY ? true : false
|
||||
}
|
||||
|
||||
+4
-1
@@ -10,6 +10,7 @@ const IpfsCoord = require('ipfs-coord')
|
||||
const BCHJS = require('@psf/bch-js')
|
||||
|
||||
// Local libraries
|
||||
const config = require('../../config')
|
||||
const JSONRPC = require('../rpc')
|
||||
|
||||
class IPFSLib {
|
||||
@@ -19,6 +20,7 @@ class IPFSLib {
|
||||
this.IpfsCoord = IpfsCoord
|
||||
this.bchjs = new BCHJS()
|
||||
this.rpc = new JSONRPC()
|
||||
this.config = config
|
||||
|
||||
// this.rpc = {}
|
||||
// if (localConfig.rpc) {
|
||||
@@ -81,7 +83,8 @@ class IPFSLib {
|
||||
ipfs: this.ipfs,
|
||||
type: 'node.js',
|
||||
bchjs: this.bchjs,
|
||||
privateLog: this.rpc.router
|
||||
privateLog: this.rpc.router,
|
||||
isCircuitRelay: this.config.isCircuitRelay
|
||||
})
|
||||
|
||||
await this.ipfsCoord.isReady()
|
||||
|
||||
Reference in New Issue
Block a user