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

@ -6,7 +6,7 @@ const { default: PQueue } = require('p-queue')
const BN = require('../../../bn')
const E = require('../../../error')
const { logger } = require('../../../blockchain/common')
const logger = require('../../../logger')
const options = require('../../../options')
const jsonRpc = require('../../common/json-rpc')
@ -40,7 +40,12 @@ function rpcConfig () {
port: cryptoRec.walletPort || cryptoRec.defaultPort
}
} catch (err) {
throw new Error('wallet is currently not installed')
logger.error('Wallet is currently not installed!')
return {
username: '',
password: '',
port: cryptoRec.walletPort || cryptoRec.defaultPort
}
}
}