feat: advanced wallet settings up to spec
This commit is contained in:
parent
45173e7c0e
commit
4120d58a1b
6 changed files with 246 additions and 123 deletions
22
migrations/1645010873828-add-advanced-wallet-settings.js
Normal file
22
migrations/1645010873828-add-advanced-wallet-settings.js
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
const uuid = require('uuid')
|
||||
const { saveConfig, loadLatest } = 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)
|
||||
})
|
||||
.then(next)
|
||||
.catch(err => {
|
||||
return next(err)
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue