feat: change to generic ERC-20 ABI json file

fix: coinUtils rename import
This commit is contained in:
Sérgio Salgado 2021-06-10 01:43:22 +01:00 committed by Josh Harvey
parent dff407e30e
commit 8e099e3283
36 changed files with 364 additions and 249 deletions

View file

@ -7,13 +7,13 @@ const makeDir = require('make-dir')
const inquirer = require('inquirer')
const _ = require('lodash/fp')
const { utils } = require('lamassu-coins')
const coinUtils = require('../coin-utils')
const { utils: coinUtils } = require('lamassu-coins')
const blockchainUtils = require('../blockchain-utils')
const common = require('./common')
const doVolume = require('./do-volume')
const cryptos = utils.cryptoCurrencies()
const cryptos = coinUtils.cryptoCurrencies()
const logger = common.logger
@ -29,7 +29,7 @@ const PLUGINS = {
module.exports = {run}
function installedVolumeFilePath (crypto) {
return path.resolve(utils.cryptoDir(crypto, coinUtils.blockchainDir()), '.installed')
return path.resolve(coinUtils.cryptoDir(crypto, blockchainUtils.blockchainDir()), '.installed')
}
function isInstalledVolume (crypto) {
@ -59,7 +59,7 @@ function processCryptos (codes) {
_.forEach(setupCrypto, selectedCryptos)
common.es('sudo service supervisor restart')
const blockchainDir = coinUtils.blockchainDir()
const blockchainDir = blockchainUtils.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 = utils.cryptoDir(crypto, coinUtils.blockchainDir())
const cryptoDir = coinUtils.cryptoDir(crypto, blockchainUtils.blockchainDir())
makeDir.sync(cryptoDir)
const cryptoPlugin = plugin(crypto)
const oldDir = process.cwd()