fix: simplified double ternary

fix: select XMR through the coins consts object
This commit is contained in:
Sérgio Salgado 2021-08-01 22:31:28 +01:00
parent 4314e162c6
commit 47eab0e6fc
2 changed files with 7 additions and 6 deletions

View file

@ -102,10 +102,11 @@ function writeSupervisorConfig (coinRec, cmd, walletCmd = '') {
}
function isInstalledSoftware (coinRec) {
return !_.isNil(coinRec.wallet)
? fs.existsSync(`/etc/supervisor/conf.d/${coinRec.code}.conf`)
&& fs.existsSync(`/etc/supervisor/conf.d/${coinRec.code}-wallet.conf`)
: fs.existsSync(`/etc/supervisor/conf.d/${coinRec.code}.conf`)
const nodeInstalled = fs.existsSync(`/etc/supervisor/conf.d/${coinRec.code}.conf`)
const walletInstalled = _.isNil(coinRec.wallet)
? true
: fs.existsSync(`/etc/supervisor/conf.d/${coinRec.code}.wallet.conf`)
return nodeInstalled && walletInstalled
}
function fetchAndInstall (coinRec) {