feat: address prompt feature toggle on ui
This commit is contained in:
parent
e6ffcacb78
commit
a4bdbd1416
3 changed files with 33 additions and 1 deletions
|
|
@ -353,7 +353,11 @@ function addOrUpdateCustomer(
|
|||
.then(discount => ({ ...customer, discount }))
|
||||
})
|
||||
.then(customer => {
|
||||
if (!cryptoCode) return customer
|
||||
const enableLastUsedAddress = !!configManager.getWalletSettings(
|
||||
cryptoCode,
|
||||
config,
|
||||
).enableLastUsedAddress
|
||||
if (!cryptoCode || !enableLastUsedAddress) return customer
|
||||
return customers
|
||||
.getLastUsedAddress(customer.id, cryptoCode)
|
||||
.then(lastUsedAddress => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
const { saveConfig } = require('../lib/new-settings-loader')
|
||||
|
||||
exports.up = function (next) {
|
||||
const newConfig = {
|
||||
wallets_advanced_enableLastUsedAddress: false,
|
||||
}
|
||||
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