Merge PR #3836: Fix WithdrawValidatorCommission

This commit is contained in:
Alexander Bezobchuk
2019-03-12 16:10:20 +01:00
committed by Christopher Goes
parent db421fc0a6
commit b316c477c1
4 changed files with 18 additions and 6 deletions
+3 -1
View File
@@ -179,7 +179,9 @@ func (coins DecCoins) TruncateDecimal() (Coins, DecCoins) {
for i, coin := range coins {
truncated, change := coin.TruncateDecimal()
out[i] = truncated
changeSum = changeSum.Add(DecCoins{change})
if !change.IsZero() {
changeSum = changeSum.Add(DecCoins{change})
}
}
return out, changeSum