diff --git a/lib/blockchain/common.js b/lib/blockchain/common.js index 0f0625e6..273515e2 100644 --- a/lib/blockchain/common.js +++ b/lib/blockchain/common.js @@ -123,9 +123,7 @@ function fetchAndInstall (coinRec) { const binDir = requiresUpdate ? binaries.defaultDir : binaries.dir es(`wget -q ${url}`) - es(`echo ${downloadFile} | awk -F. '{print $NF}'`) === 'bz2' - ? es(`tar -xf ${downloadFile}`) - : es(`tar -xzf ${downloadFile}`) + es(`tar -xf ${downloadFile}`) if (_.isEmpty(binaries.files)) { es(`sudo cp ${binDir}/* /usr/local/bin`) diff --git a/lib/blockchain/install.js b/lib/blockchain/install.js index 8596d8f9..717c9945 100644 --- a/lib/blockchain/install.js +++ b/lib/blockchain/install.js @@ -71,7 +71,10 @@ function processCryptos (codes) { ) | crontab -` common.es(rsyncCmd) - _.forEach(updateCrypto, selectedCryptos) + _.forEach(c => { + updateCrypto(c) + common.es(`sudo supervisorctl start ${c.code}`) + }, selectedCryptos) logger.info('Installation complete.') } @@ -98,7 +101,9 @@ function setupCrypto (crypto) { function updateCrypto (crypto) { if (!common.isUpdateDependent(crypto.cryptoCode)) return const cryptoPlugin = plugin(crypto) - cryptoPlugin.updateCore(common.getBinaries(crypto.cryptoCode)) + const status = common.es(`sudo supervisorctl status ${crypto.code} | awk '{ print $2 }'`).trim() + const isCurrentlyRunning = status === 'RUNNING' + cryptoPlugin.updateCore(common.getBinaries(crypto.cryptoCode), isCurrentlyRunning) } function plugin (crypto) { @@ -108,15 +113,19 @@ function plugin (crypto) { } function run () { - const choices = _.map(c => { - const checked = isInstalledSoftware(c) && isInstalledVolume(c) - return { - name: c.display, - value: c.code, - checked, - disabled: checked && 'Installed' - } - }, cryptos) + const choices = _.flow([ + _.filter(c => c.type !== 'erc-20'), + _.map(c => { + const checked = isInstalledSoftware(c) && isInstalledVolume(c) + const name = c.code === 'ethereum' ? 'Ethereum and/or USDT' : c.display + return { + name, + value: c.code, + checked, + disabled: checked && 'Installed' + } + }), + ])(cryptos) const questions = [] diff --git a/lib/new-admin/config/accounts.js b/lib/new-admin/config/accounts.js index e5520245..cee89900 100644 --- a/lib/new-admin/config/accounts.js +++ b/lib/new-admin/config/accounts.js @@ -17,8 +17,8 @@ const ZERO_CONF = 'zeroConf' const ALL_ACCOUNTS = [ { code: 'binanceus', display: 'Binance.us', class: TICKER, cryptos: binanceus.CRYPTO }, - { code: 'cex', display: 'Cex', class: TICKER, cryptos: cex.CRYPTO }, - { code: 'ftx', display: 'Ftx', class: TICKER, cryptos: ftx.CRYPTO }, + { code: 'cex', display: 'CEX', class: TICKER, cryptos: cex.CRYPTO }, + { code: 'ftx', display: 'FTX', class: TICKER, cryptos: ftx.CRYPTO }, { code: 'bitpay', display: 'Bitpay', class: TICKER, cryptos: bitpay.CRYPTO }, { code: 'kraken', display: 'Kraken', class: TICKER, cryptos: kraken.CRYPTO }, { code: 'bitstamp', display: 'Bitstamp', class: TICKER, cryptos: bitstamp.CRYPTO }, @@ -39,8 +39,8 @@ const ALL_ACCOUNTS = [ { code: 'itbit', display: 'itBit', class: EXCHANGE, cryptos: itbit.CRYPTO }, { code: 'kraken', display: 'Kraken', class: EXCHANGE, cryptos: kraken.CRYPTO }, { code: 'binanceus', display: 'Binance.us', class: EXCHANGE, cryptos: binanceus.CRYPTO }, - { code: 'cex', display: 'Cex', class: EXCHANGE, cryptos: cex.CRYPTO }, - { code: 'ftx', display: 'Ftx', class: EXCHANGE, cryptos: ftx.CRYPTO }, + { code: 'cex', display: 'CEX', class: EXCHANGE, cryptos: cex.CRYPTO }, + { code: 'ftx', display: 'FTX', class: EXCHANGE, cryptos: ftx.CRYPTO }, { code: 'mock-wallet', display: 'Mock (Caution!)', class: WALLET, cryptos: ALL_CRYPTOS, dev: true }, { code: 'no-exchange', display: 'No exchange', class: EXCHANGE, cryptos: ALL_CRYPTOS }, { code: 'mock-exchange', display: 'Mock exchange', class: EXCHANGE, cryptos: ALL_CRYPTOS, dev: true },