handleZeroAmount returns zero amounts for all distributions when total is zero
(distributions []Distribution)
| 383 | |
| 384 | // handleZeroAmount returns zero amounts for all distributions when total is zero |
| 385 | func handleZeroAmount(distributions []Distribution) map[string]*big.Int { |
| 386 | result := make(map[string]*big.Int) |
| 387 | for _, dist := range distributions { |
| 388 | result[dist.Identifier] = big.NewInt(0) |
| 389 | } |
| 390 | return result |
| 391 | } |
| 392 | |
| 393 | // handleSmallAmount assigns entire amount to first distribution for very small amounts |
| 394 | func handleSmallAmount(totalAmountDec decimal.Decimal, totalPreciseAmount *big.Int, distributions []Distribution) map[string]*big.Int { |
no outgoing calls