From 50e78078e30fcb9af0edd74dd288de487b54f5b4 Mon Sep 17 00:00:00 2001 From: pedromiguelmiranda <32689555+pedromiguelmiranda@users.noreply.github.com> Date: Wed, 3 Oct 2018 15:11:19 +0100 Subject: [PATCH] 7.3 crafty chhnemu | https://trello.com/c/3fMfHclE (#179) * Added default ETH(infura) * Code changes regarding review on PR 179 (https://github.com/lamassu/lamassu-server/pull/179) * Code changes regarding review on PR 179 (#179) --- lib/blockchain/install.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/blockchain/install.js b/lib/blockchain/install.js index 79d86f64..c2094540 100644 --- a/lib/blockchain/install.js +++ b/lib/blockchain/install.js @@ -97,13 +97,16 @@ function plugin (crypto) { } function run () { + const ETHEREUM_CRYPTO_CODE ='ETH' const choices = _.map(c => { const checked = isInstalledSoftware(c) && isInstalledVolume(c) return { name: c.display, value: c.code, checked, - disabled: checked && 'Installed' + disabled: c.cryptoCode === ETHEREUM_CRYPTO_CODE + ? 'Installed, use Infura option' + : checked && 'Installed' } }, cryptos) @@ -117,5 +120,8 @@ function run () { }) inquirer.prompt(questions) - .then(answers => processCryptos(answers.crypto)) + .then(answers => { + answers.crypto.push(coinUtils.getCryptoCurrency(ETHEREUM_CRYPTO_CODE).code) + processCryptos(answers.crypto) + }) }