add wallet backup to coin install

This commit is contained in:
Josh Harvey 2017-08-06 23:56:06 +03:00
parent a5592b612f
commit 71e354e9ff
5 changed files with 19 additions and 6 deletions

View file

@ -52,7 +52,7 @@ const CRYPTO_CURRENCIES = [
}
]
module.exports = {buildUrl, cryptoDir, configPath, cryptoCurrencies, getCryptoCurrency}
module.exports = {buildUrl, cryptoDir, blockchainDir, configPath, cryptoCurrencies, getCryptoCurrency}
function getCryptoCurrency (cryptoCode) {
const cryptoCurrency = _.find(['cryptoCode', cryptoCode], CRYPTO_CURRENCIES)
@ -75,10 +75,13 @@ function buildUrl (cryptoCode, address) {
}
}
function blockchainDir () {
return options.blockchainDir
}
function cryptoDir (cryptoRec) {
const code = cryptoRec.code
const blockchainDir = options.blockchainDir
return path.resolve(blockchainDir, code)
return path.resolve(blockchainDir(), code)
}
function configPath (cryptoRec) {