From f83ea0a06c5ecefee2e5599ad00da8537c50245d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20S=C3=A1?= Date: Thu, 30 Dec 2021 14:22:35 +0000 Subject: [PATCH 1/5] chore: display name for CEX and FTX --- lib/new-admin/config/accounts.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 }, From fab755dc629086f59e9696964d1b8c51f7e03dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20S=C3=A1?= Date: Thu, 30 Dec 2021 14:23:14 +0000 Subject: [PATCH 2/5] fix: bitcoind install --- lib/blockchain/install.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/blockchain/install.js b/lib/blockchain/install.js index 8596d8f9..554e3951 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) { From 0a27c14079e886cecb2aab5e85bd0cbb60069c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20S=C3=A1?= Date: Thu, 30 Dec 2021 14:26:43 +0000 Subject: [PATCH 3/5] fix: Monero install --- lib/blockchain/common.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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`) From ba7b1d3d97bf02ef29fea507f9fd99ec9f9809b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20S=C3=A1?= Date: Thu, 30 Dec 2021 15:16:18 +0000 Subject: [PATCH 4/5] refactor: filter Tether/USDT from install candidates --- lib/blockchain/install.js | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/blockchain/install.js b/lib/blockchain/install.js index 554e3951..efc48107 100644 --- a/lib/blockchain/install.js +++ b/lib/blockchain/install.js @@ -113,15 +113,18 @@ 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) + return { + name: c.display, + value: c.code, + checked, + disabled: checked && 'Installed' + } + }), + ])(cryptos) const questions = [] From 09f62e3a16a41c34f6ecb2396f1c57a074027881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20S=C3=A1?= Date: Thu, 30 Dec 2021 18:05:30 +0000 Subject: [PATCH 5/5] chore: rename "Ethereum" to "Ethereum and/or USDT" Only for the `lamassu-coins` script. --- lib/blockchain/install.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/blockchain/install.js b/lib/blockchain/install.js index efc48107..717c9945 100644 --- a/lib/blockchain/install.js +++ b/lib/blockchain/install.js @@ -117,8 +117,9 @@ function run () { _.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: c.display, + name, value: c.code, checked, disabled: checked && 'Installed'