fix: remove blockchain utils module
This commit is contained in:
parent
de832e435b
commit
fc4af4885a
7 changed files with 14 additions and 21 deletions
|
|
@ -1,7 +0,0 @@
|
|||
const options = require('./options')
|
||||
|
||||
function blockchainDir () {
|
||||
return options.blockchainDir
|
||||
}
|
||||
|
||||
module.exports = { blockchainDir }
|
||||
|
|
@ -8,7 +8,7 @@ const inquirer = require('inquirer')
|
|||
const _ = require('lodash/fp')
|
||||
|
||||
const { utils: coinUtils } = require('lamassu-coins')
|
||||
const blockchainUtils = require('../blockchain-utils')
|
||||
const options = require('../options')
|
||||
|
||||
const common = require('./common')
|
||||
const doVolume = require('./do-volume')
|
||||
|
|
@ -29,7 +29,7 @@ const PLUGINS = {
|
|||
module.exports = {run}
|
||||
|
||||
function installedVolumeFilePath (crypto) {
|
||||
return path.resolve(coinUtils.cryptoDir(crypto, blockchainUtils.blockchainDir()), '.installed')
|
||||
return path.resolve(coinUtils.cryptoDir(crypto, options.blockchainDir), '.installed')
|
||||
}
|
||||
|
||||
function isInstalledVolume (crypto) {
|
||||
|
|
@ -59,7 +59,7 @@ function processCryptos (codes) {
|
|||
_.forEach(setupCrypto, selectedCryptos)
|
||||
common.es('sudo service supervisor restart')
|
||||
|
||||
const blockchainDir = blockchainUtils.blockchainDir()
|
||||
const blockchainDir = options.blockchainDir
|
||||
const backupDir = path.resolve(os.homedir(), 'backups')
|
||||
const rsyncCmd = `( \
|
||||
(crontab -l 2>/dev/null || echo -n "") | grep -v "@daily rsync ".*"wallet.dat"; \
|
||||
|
|
@ -74,7 +74,7 @@ function processCryptos (codes) {
|
|||
|
||||
function setupCrypto (crypto) {
|
||||
logger.info(`Installing ${crypto.display}...`)
|
||||
const cryptoDir = coinUtils.cryptoDir(crypto, blockchainUtils.blockchainDir())
|
||||
const cryptoDir = coinUtils.cryptoDir(crypto, options.blockchainDir)
|
||||
makeDir.sync(cryptoDir)
|
||||
const cryptoPlugin = plugin(crypto)
|
||||
const oldDir = process.cwd()
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
const _ = require('lodash/fp')
|
||||
const jsonRpc = require('../../common/json-rpc')
|
||||
|
||||
const blockchainUtils = require('../../../blockchain-utils')
|
||||
const options = require('../../../options')
|
||||
const BN = require('../../../bn')
|
||||
const E = require('../../../error')
|
||||
const { utils: coinUtils } = require('lamassu-coins')
|
||||
|
||||
const cryptoRec = coinUtils.getCryptoCurrency('BCH')
|
||||
const configPath = coinUtils.configPath(cryptoRec, blockchainUtils.blockchainDir())
|
||||
const configPath = coinUtils.configPath(cryptoRec, options.blockchainDir)
|
||||
const unitScale = cryptoRec.unitScale
|
||||
|
||||
function rpcConfig () {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
const _ = require('lodash/fp')
|
||||
const jsonRpc = require('../../common/json-rpc')
|
||||
|
||||
const blockchainUtils = require('../../../blockchain-utils')
|
||||
const options = require('../../../options')
|
||||
const BN = require('../../../bn')
|
||||
const E = require('../../../error')
|
||||
const { utils: coinUtils } = require('lamassu-coins')
|
||||
|
||||
const cryptoRec = coinUtils.getCryptoCurrency('BTC')
|
||||
const configPath = coinUtils.configPath(cryptoRec, blockchainUtils.blockchainDir())
|
||||
const configPath = coinUtils.configPath(cryptoRec, options.blockchainDir)
|
||||
const unitScale = cryptoRec.unitScale
|
||||
|
||||
function rpcConfig () {
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ const jsonRpc = require('../../common/json-rpc')
|
|||
|
||||
const { utils: coinUtils } = require('lamassu-coins')
|
||||
|
||||
const blockchainUtils = require('../../../blockchain-utils')
|
||||
const options = require('../../../options')
|
||||
const BN = require('../../../bn')
|
||||
const E = require('../../../error')
|
||||
|
||||
const cryptoRec = coinUtils.getCryptoCurrency('DASH')
|
||||
const configPath = coinUtils.configPath(cryptoRec, blockchainUtils.blockchainDir())
|
||||
const configPath = coinUtils.configPath(cryptoRec, options.blockchainDir)
|
||||
const unitScale = cryptoRec.unitScale
|
||||
|
||||
function rpcConfig () {
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ const jsonRpc = require('../../common/json-rpc')
|
|||
|
||||
const { utils: coinUtils } = require('lamassu-coins')
|
||||
|
||||
const blockchainUtils = require('../../../blockchain-utils')
|
||||
const options = require('../../../options')
|
||||
const BN = require('../../../bn')
|
||||
const E = require('../../../error')
|
||||
|
||||
const cryptoRec = coinUtils.getCryptoCurrency('LTC')
|
||||
const configPath = coinUtils.configPath(cryptoRec, blockchainUtils.blockchainDir())
|
||||
const configPath = coinUtils.configPath(cryptoRec, options.blockchainDir)
|
||||
const unitScale = cryptoRec.unitScale
|
||||
|
||||
function rpcConfig () {
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ const jsonRpc = require('../../common/json-rpc')
|
|||
|
||||
const { utils: coinUtils } = require('lamassu-coins')
|
||||
|
||||
const blockchainUtils = require('../../../blockchain-utils')
|
||||
const options = require('../../../options')
|
||||
const BN = require('../../../bn')
|
||||
const E = require('../../../error')
|
||||
|
||||
const cryptoRec = coinUtils.getCryptoCurrency('ZEC')
|
||||
const configPath = coinUtils.configPath(cryptoRec, blockchainUtils.blockchainDir())
|
||||
const configPath = coinUtils.configPath(cryptoRec, options.blockchainDir)
|
||||
const unitScale = cryptoRec.unitScale
|
||||
|
||||
function rpcConfig () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue