feat: decouple l-s entrypoint
This commit is contained in:
parent
2a2c1fccc8
commit
f4d6b5e454
48 changed files with 411 additions and 232 deletions
|
|
@ -6,9 +6,7 @@ const _ = require('lodash/fp')
|
|||
const request = require('request-promise')
|
||||
const { utils: coinUtils } = require('@lamassu/coins')
|
||||
|
||||
const options = require('../../options')
|
||||
|
||||
const blockchainDir = options.blockchainDir
|
||||
const BLOCKCHAIN_DIR = process.env.BLOCKCHAIN_DIR
|
||||
|
||||
module.exports = {
|
||||
fetch, fetchDigest, parseConf, rpcConfig
|
||||
|
|
@ -108,7 +106,7 @@ function parseConf (confPath) {
|
|||
|
||||
function rpcConfig (cryptoRec) {
|
||||
try {
|
||||
const configPath = coinUtils.configPath(cryptoRec, blockchainDir)
|
||||
const configPath = coinUtils.configPath(cryptoRec, BLOCKCHAIN_DIR)
|
||||
const config = parseConf(configPath)
|
||||
return {
|
||||
username: config.rpcuser,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue