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,11 +1,11 @@
|
|||
const { removeFromConfig, loadLatest } = require('../lib/new-settings-loader')
|
||||
const { removeFromConfig, loadLatestConfig } = require('../lib/new-settings-loader')
|
||||
const { getCryptosFromWalletNamespace } = require('../lib/new-config-manager.js')
|
||||
const _ = require('lodash/fp')
|
||||
|
||||
exports.up = function (next) {
|
||||
loadLatest()
|
||||
.then(settings => {
|
||||
const configuredCryptos = getCryptosFromWalletNamespace(settings.config)
|
||||
loadLatestConfig()
|
||||
.then(config => {
|
||||
const configuredCryptos = getCryptosFromWalletNamespace(config)
|
||||
if (!configuredCryptos.length) return Promise.resolve()
|
||||
|
||||
return removeFromConfig(_.map(it => `wallets_${it}_cryptoUnits`, configuredCryptos))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue