refactor: use loadLatestConfig() in place of loadLatest() where applicable
This commit is contained in:
parent
5342e9a8be
commit
cac88fda45
15 changed files with 52 additions and 56 deletions
|
|
@ -1,16 +1,14 @@
|
|||
const uuid = require('uuid')
|
||||
const { saveConfig, loadLatest } = require('../lib/new-settings-loader')
|
||||
const { saveConfig } = require('../lib/new-settings-loader')
|
||||
|
||||
exports.up = function (next) {
|
||||
const newConfig = {}
|
||||
return loadLatest()
|
||||
.then(config => {
|
||||
newConfig[`wallets_advanced_feeMultiplier`] = '1'
|
||||
newConfig[`wallets_advanced_cryptoUnits`] = 'full'
|
||||
newConfig[`wallets_advanced_allowTransactionBatching`] = false
|
||||
newConfig[`wallets_advanced_id`] = uuid.v4()
|
||||
return saveConfig(newConfig)
|
||||
})
|
||||
const newConfig = {
|
||||
wallets_advanced_feeMultiplier: '1',
|
||||
wallets_advanced_cryptoUnits: 'full',
|
||||
wallets_advanced_allowTransactionBatching: false,
|
||||
wallets_advanced_id: uuid.v4(),
|
||||
}
|
||||
return saveConfig(newConfig)
|
||||
.then(next)
|
||||
.catch(err => {
|
||||
return next(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue