fix: dispense for multiple boxes with same denom
This commit is contained in:
parent
8d807294c3
commit
1507dcced9
1 changed files with 6 additions and 1 deletions
|
|
@ -138,7 +138,12 @@ const solutionToOriginalUnits = (solution, units) => {
|
|||
|
||||
const billsLeft = _.flow(
|
||||
_.map(([denomination, provisioned]) => [BN(denomination), provisioned]),
|
||||
_.fromPairs,
|
||||
_.reduce((acc, value) => {
|
||||
acc[value[0]] = (acc[value[0]] || BN(0)).plus(value[1])
|
||||
return acc
|
||||
},
|
||||
{}
|
||||
)
|
||||
)(solution)
|
||||
|
||||
return _.map(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue