refactor: use destructuring instead of indexing
This commit is contained in:
parent
23eadc1717
commit
738f4f5b13
1 changed files with 1 additions and 1 deletions
|
|
@ -158,7 +158,7 @@ function plugins (settings, deviceId) {
|
|||
throw new Error('Denominations don\'t add up, recyclers were changed.')
|
||||
}
|
||||
|
||||
return _.map(r => r[0] + r[1].provisioned, _.zip(sum, tx.bills))
|
||||
return _.map(([acc, bill]) => acc + bill.provisioned, _.zip(sum, bills))
|
||||
}
|
||||
|
||||
const provisioned = _.reduce(sumTxs, _.times(_.constant(0), _.size(recyclers)), redeemableTxs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue