combineDistributions merges fixed and percentage amounts into the result
(state *distributionState)
| 270 | |
| 271 | // combineDistributions merges fixed and percentage amounts into the result |
| 272 | func combineDistributions(state *distributionState) { |
| 273 | for id, amountDec := range state.fixedAmounts { |
| 274 | state.result[id] = amountDec.BigInt() |
| 275 | } |
| 276 | |
| 277 | for id, amountDec := range state.percentAmounts { |
| 278 | state.result[id] = amountDec.BigInt() |
| 279 | state.amountLeftDec = state.amountLeftDec.Sub(amountDec) |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | // processLeftDistribution handles the "left" distribution type |
| 284 | func processLeftDistribution(distributions []Distribution, state *distributionState) error { |
no outgoing calls
no test coverage detected