chore: initial function stubs
This commit is contained in:
parent
b190b349b3
commit
75cb094476
2 changed files with 18 additions and 3 deletions
|
|
@ -112,6 +112,11 @@ function plugin (crypto) {
|
|||
return plugin
|
||||
}
|
||||
|
||||
function getSyncedBlockchains (cryptoList) {
|
||||
const installedCryptos = _.reduce((acc, value) => ({ ...acc, [value.cryptoCode]: isInstalledSoftware(value) && isInstalledVolume(value) }), {}, cryptoList)
|
||||
const syncedBlockchains = plugin()
|
||||
}
|
||||
|
||||
function run () {
|
||||
const choices = _.flow([
|
||||
_.filter(c => c.type !== 'erc-20'),
|
||||
|
|
@ -132,10 +137,14 @@ function run () {
|
|||
questions.push({
|
||||
type: 'checkbox',
|
||||
name: 'crypto',
|
||||
message: 'Which cryptocurrencies would you like to install?',
|
||||
choices
|
||||
message: 'Which cryptocurrencies would you like to install?\nTo prevent server resource overloading, only TWO coins should be installed simultaneously.\nMore coins can be installed after this process is over.',
|
||||
choices,
|
||||
validate: (a) => {
|
||||
getSyncedBlockchains(cryptos)
|
||||
return _.size(a) > 0 && _.size(a) <= 2
|
||||
}
|
||||
})
|
||||
|
||||
inquirer.prompt(questions)
|
||||
.then(answers => processCryptos(answers.crypto))
|
||||
.then(answers => console.log('answers', answers) /* processCryptos(answers.crypto) */)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue