fix: json-rpc exporting and undefined blockchain dir
This commit is contained in:
parent
bbde0fc2b6
commit
50c07c5e8f
7 changed files with 16 additions and 24 deletions
|
|
@ -4,8 +4,15 @@ const uuid = require('uuid')
|
|||
const fs = require('fs')
|
||||
const _ = require('lodash/fp')
|
||||
const request = require('request-promise')
|
||||
const { utils: coinUtils } = require('lamassu-coins')
|
||||
|
||||
module.exports = {fetch, fetchDigest, parseConf}
|
||||
const options = require('../../../options')
|
||||
|
||||
const blockchainDir = options.blockchainDir
|
||||
|
||||
module.exports = {
|
||||
fetch, fetchDigest, parseConf, rpcConfig
|
||||
}
|
||||
|
||||
function fetch (account = {}, method, params) {
|
||||
params = _.defaultTo([], params)
|
||||
|
|
@ -101,7 +108,7 @@ function parseConf (confPath) {
|
|||
|
||||
function rpcConfig (cryptoRec) {
|
||||
try {
|
||||
const configPath = coinUtils.configPath(cryptoRec)
|
||||
const configPath = coinUtils.configPath(cryptoRec, blockchainDir)
|
||||
const config = parseConf(configPath)
|
||||
return {
|
||||
username: config.rpcuser,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue