Feat: disable ETH 0-confLimit edit, in migrations make ETH 0-confLimit 0

This commit is contained in:
csrapr 2021-04-15 17:09:24 +01:00 committed by Josh Harvey
parent 23fc689f07
commit 84e7b67635
4 changed files with 33 additions and 13 deletions

View file

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