fix: set ETH zero conf limit to 0
This commit is contained in:
parent
5949764389
commit
5a25c0dde2
2 changed files with 27 additions and 0 deletions
22
migrations/1661125970289-eth-zero-conf-value.js
Normal file
22
migrations/1661125970289-eth-zero-conf-value.js
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
const _ = require('lodash/fp')
|
||||
|
||||
const { saveConfig, loadLatest } = require('../lib/new-settings-loader')
|
||||
|
||||
exports.up = function (next) {
|
||||
const newConfig = {}
|
||||
return loadLatest()
|
||||
.then(config => {
|
||||
if (!_.isNil(config.config.wallets_ETH_zeroConfLimit) && config.config.wallets_ETH_zeroConfLimit !== 0) {
|
||||
newConfig[`wallets_ETH_zeroConfLimit`] = 0
|
||||
return saveConfig(newConfig)
|
||||
}
|
||||
})
|
||||
.then(next)
|
||||
.catch(err => {
|
||||
return next(err)
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue