Merge pull request #1028 from SiIky/chore/lam-234/rename-ethereum

chore: rename "Ethereum" to "Ethereum and/or USDT"
This commit is contained in:
Rafael Taranto 2022-01-05 14:54:34 +00:00 committed by GitHub
commit 438aa123a8
3 changed files with 25 additions and 18 deletions

View file

@ -123,9 +123,7 @@ function fetchAndInstall (coinRec) {
const binDir = requiresUpdate ? binaries.defaultDir : binaries.dir const binDir = requiresUpdate ? binaries.defaultDir : binaries.dir
es(`wget -q ${url}`) es(`wget -q ${url}`)
es(`echo ${downloadFile} | awk -F. '{print $NF}'`) === 'bz2' es(`tar -xf ${downloadFile}`)
? es(`tar -xf ${downloadFile}`)
: es(`tar -xzf ${downloadFile}`)
if (_.isEmpty(binaries.files)) { if (_.isEmpty(binaries.files)) {
es(`sudo cp ${binDir}/* /usr/local/bin`) es(`sudo cp ${binDir}/* /usr/local/bin`)

View file

@ -71,7 +71,10 @@ function processCryptos (codes) {
) | crontab -` ) | crontab -`
common.es(rsyncCmd) common.es(rsyncCmd)
_.forEach(updateCrypto, selectedCryptos) _.forEach(c => {
updateCrypto(c)
common.es(`sudo supervisorctl start ${c.code}`)
}, selectedCryptos)
logger.info('Installation complete.') logger.info('Installation complete.')
} }
@ -98,7 +101,9 @@ function setupCrypto (crypto) {
function updateCrypto (crypto) { function updateCrypto (crypto) {
if (!common.isUpdateDependent(crypto.cryptoCode)) return if (!common.isUpdateDependent(crypto.cryptoCode)) return
const cryptoPlugin = plugin(crypto) 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) { function plugin (crypto) {
@ -108,15 +113,19 @@ function plugin (crypto) {
} }
function run () { function run () {
const choices = _.map(c => { const choices = _.flow([
const checked = isInstalledSoftware(c) && isInstalledVolume(c) _.filter(c => c.type !== 'erc-20'),
return { _.map(c => {
name: c.display, const checked = isInstalledSoftware(c) && isInstalledVolume(c)
value: c.code, const name = c.code === 'ethereum' ? 'Ethereum and/or USDT' : c.display
checked, return {
disabled: checked && 'Installed' name,
} value: c.code,
}, cryptos) checked,
disabled: checked && 'Installed'
}
}),
])(cryptos)
const questions = [] const questions = []

View file

@ -17,8 +17,8 @@ const ZERO_CONF = 'zeroConf'
const ALL_ACCOUNTS = [ const ALL_ACCOUNTS = [
{ code: 'binanceus', display: 'Binance.us', class: TICKER, cryptos: binanceus.CRYPTO }, { code: 'binanceus', display: 'Binance.us', class: TICKER, cryptos: binanceus.CRYPTO },
{ code: 'cex', display: 'Cex', class: TICKER, cryptos: cex.CRYPTO }, { code: 'cex', display: 'CEX', class: TICKER, cryptos: cex.CRYPTO },
{ code: 'ftx', display: 'Ftx', class: TICKER, cryptos: ftx.CRYPTO }, { code: 'ftx', display: 'FTX', class: TICKER, cryptos: ftx.CRYPTO },
{ code: 'bitpay', display: 'Bitpay', class: TICKER, cryptos: bitpay.CRYPTO }, { code: 'bitpay', display: 'Bitpay', class: TICKER, cryptos: bitpay.CRYPTO },
{ code: 'kraken', display: 'Kraken', class: TICKER, cryptos: kraken.CRYPTO }, { code: 'kraken', display: 'Kraken', class: TICKER, cryptos: kraken.CRYPTO },
{ code: 'bitstamp', display: 'Bitstamp', class: TICKER, cryptos: bitstamp.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: 'itbit', display: 'itBit', class: EXCHANGE, cryptos: itbit.CRYPTO },
{ code: 'kraken', display: 'Kraken', class: EXCHANGE, cryptos: kraken.CRYPTO }, { code: 'kraken', display: 'Kraken', class: EXCHANGE, cryptos: kraken.CRYPTO },
{ code: 'binanceus', display: 'Binance.us', class: EXCHANGE, cryptos: binanceus.CRYPTO }, { code: 'binanceus', display: 'Binance.us', class: EXCHANGE, cryptos: binanceus.CRYPTO },
{ code: 'cex', display: 'Cex', class: EXCHANGE, cryptos: cex.CRYPTO }, { code: 'cex', display: 'CEX', class: EXCHANGE, cryptos: cex.CRYPTO },
{ code: 'ftx', display: 'Ftx', class: EXCHANGE, cryptos: ftx.CRYPTO }, { code: 'ftx', display: 'FTX', class: EXCHANGE, cryptos: ftx.CRYPTO },
{ code: 'mock-wallet', display: 'Mock (Caution!)', class: WALLET, cryptos: ALL_CRYPTOS, dev: true }, { 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: 'no-exchange', display: 'No exchange', class: EXCHANGE, cryptos: ALL_CRYPTOS },
{ code: 'mock-exchange', display: 'Mock exchange', class: EXCHANGE, cryptos: ALL_CRYPTOS, dev: true }, { code: 'mock-exchange', display: 'Mock exchange', class: EXCHANGE, cryptos: ALL_CRYPTOS, dev: true },