feat: migrate fee discount config field for each installed coin
This commit is contained in:
parent
d6771840bd
commit
32f79bc450
3 changed files with 11 additions and 16 deletions
|
|
@ -1,11 +1,13 @@
|
|||
const _ = require('lodash/fp')
|
||||
const { saveConfig, loadLatest } = require('../lib/new-settings-loader')
|
||||
const { getCryptosFromWalletNamespace } = require('../lib/new-config-manager')
|
||||
|
||||
exports.up = function (next) {
|
||||
const newConfig = {
|
||||
wallets_BTC_feeDiscount: '1'
|
||||
}
|
||||
const newConfig = {}
|
||||
return loadLatest()
|
||||
.then(config => {
|
||||
const coins = getCryptosFromWalletNamespace(config)
|
||||
_.map(coin => { newConfig[`wallets_${coin}_feeMultiplier`] = '1' }, coins)
|
||||
return saveConfig(newConfig)
|
||||
})
|
||||
.then(next)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue