Chore: remove 1-conf check in wallet plugin

Chore: Use _.isNil
This commit is contained in:
csrapr 2021-04-16 16:04:34 +01:00 committed by Josh Harvey
parent 84e7b67635
commit d1db0b95c8
3 changed files with 7 additions and 8 deletions

View file

@ -19,10 +19,10 @@ exports.up = function (next) {
_.forEach(cryptoCode => {
const walletConfig = configManager.getWalletSettings(cryptoCode, config)
const zeroConfLimit = cryptoCode === 'ETH' ? 0 : _.get('zeroConfLimit', walletConfig)
const key = `wallets_${cryptoCode}_zeroConfLimit`
if (isNil(zeroConfLimit)) {
config[key] = min
const zeroConfLimit = _.get('zeroConfLimit', walletConfig)
if (_.isNil(zeroConfLimit)) {
config[`wallets_${cryptoCode}_zeroConfLimit`] = smallerZeroConf
}
}, cryptoCodes)