lamassu-server/packages/server/migrations/1661125970289-eth-zero-conf-value.js
2025-12-31 19:04:13 +01:00

24 lines
518 B
JavaScript

const _ = require('lodash/fp')
const { loadConfig, saveConfig } = require('./settings')
exports.up = function (next) {
return loadConfig()
.then(config => {
if (
!_.isNil(config.wallets_ETH_zeroConfLimit) &&
config.wallets_ETH_zeroConfLimit !== 0
) {
const newConfig = { wallets_ETH_zeroConfLimit: 0 }
return saveConfig(newConfig)
}
})
.then(next)
.catch(err => {
return next(err)
})
}
module.exports.down = function (next) {
next()
}