fix: node fetching error handling

This commit is contained in:
Sérgio Salgado 2022-05-25 19:26:31 +01:00
parent 9abd8b2a88
commit 6aca242f9b
3 changed files with 20 additions and 4 deletions

View file

@ -7,6 +7,7 @@ const request = require('request-promise')
const { utils: coinUtils } = require('@lamassu/coins')
const options = require('../../options')
const logger = require('../../logger')
const blockchainDir = options.blockchainDir
@ -116,6 +117,9 @@ function rpcConfig (cryptoRec) {
port: config.rpcport || cryptoRec.defaultPort
}
} catch (err) {
throw new Error('Wallet is currently not installed')
logger.error('Wallet is currently not installed!')
return {
port: cryptoRec.defaultPort
}
}
}