refactor: map instead of pushing
This commit is contained in:
parent
ef3ba710ff
commit
491031a1b5
1 changed files with 4 additions and 5 deletions
|
|
@ -239,11 +239,10 @@ function plugins (settings, deviceId) {
|
|||
.then(([{ counts, numberOfRecyclers }, redeemableTxs]) => {
|
||||
redeemableTxs = _.reject(_.matchesProperty('id', excludeTxId), redeemableTxs)
|
||||
|
||||
const denominations = []
|
||||
|
||||
_.forEach(it => {
|
||||
denominations.push(cashOutConfig[`recycler${it + 1}`])
|
||||
}, _.times(_.identity(), numberOfRecyclers))
|
||||
const denominations = _.map(
|
||||
it => cashOutConfig[`recycler${it}`],
|
||||
_.range(1, numberOfRecyclers+1)
|
||||
)
|
||||
|
||||
const virtualRecyclers = denominations.length ? [Math.max(..._.flatten(denominations)) * 2] : []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue