Remove panic on zero input during MulDecTruncate

This commit is contained in:
Aleksandr Bezobchuk 2019-04-10 21:44:24 -04:00
parent f8b9a60d67
commit de720660db
No known key found for this signature in database
GPG Key ID: 7DAC30FBD99879B0
1 changed files with 1 additions and 4 deletions

View File

@ -336,11 +336,8 @@ func (coins DecCoins) MulDec(d Dec) DecCoins {
//
// CONTRACT: No zero coins will be returned.
func (coins DecCoins) MulDecTruncate(d Dec) DecCoins {
if d.IsZero() {
panic("invalid zero decimal")
}
var res DecCoins
for _, coin := range coins {
product := DecCoin{
Denom: coin.Denom,