Chore: use constant for currencyMax
This commit is contained in:
parent
7210406a8a
commit
d2b7224c73
7 changed files with 39 additions and 38 deletions
|
|
@ -23,12 +23,6 @@ const createTerms = terms => (terms.active && terms.text) ? ({
|
|||
cancel: terms.cancelButtonText
|
||||
}) : null
|
||||
|
||||
const buildZeroConfLimits = (cryptoCodes, config) => {
|
||||
const zeroConfLimits = {}
|
||||
_.forEach(cryptoCode => { zeroConfLimits[cryptoCode] = configManager.getWalletSettings(cryptoCode, config).zeroConfLimit }, cryptoCodes)
|
||||
return zeroConfLimits
|
||||
}
|
||||
|
||||
function poll (req, res, next) {
|
||||
const machineVersion = req.query.version
|
||||
const machineModel = req.query.model
|
||||
|
|
@ -38,7 +32,10 @@ function poll (req, res, next) {
|
|||
const pid = req.query.pid
|
||||
const settings = req.settings
|
||||
const localeConfig = configManager.getLocale(deviceId, settings.config)
|
||||
const zeroConfLimits = buildZeroConfLimits(localeConfig.cryptoCurrencies, settings.config)
|
||||
const zeroConfLimits = _.reduce((acc, cryptoCode) => {
|
||||
acc[cryptoCode] = configManager.getWalletSettings(cryptoCode, settings.config).zeroConfLimit
|
||||
return acc
|
||||
}, {}, localeConfig.cryptoCurrencies)
|
||||
const pi = plugins(settings, deviceId)
|
||||
const hasLightning = checkHasLightning(settings)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue