From d91a509f5367c7ba94946781e24383e38990810b Mon Sep 17 00:00:00 2001 From: Unique-Divine Date: Tue, 19 Mar 2024 14:20:19 -0500 Subject: [PATCH] refactor: use coin.Validate() --- x/inflation/types/msgs.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/x/inflation/types/msgs.go b/x/inflation/types/msgs.go index 69f574799..1cb387041 100644 --- a/x/inflation/types/msgs.go +++ b/x/inflation/types/msgs.go @@ -134,17 +134,13 @@ func (m MsgBurn) ValidateBasic() error { return err } - if m.Coin.Denom == "" { - return fmt.Errorf("coin denom should not be empty") + if err := m.Coin.Validate(); err != nil { + return err } if m.Coin.Amount.IsZero() { return fmt.Errorf("coin amount should not be zero") } - if m.Coin.IsNil() { - return fmt.Errorf("coin should not be nil") - } - return nil }