From f14cbd25849ee69a753a6a96046e58d71c735aa3 Mon Sep 17 00:00:00 2001 From: Alex | Skip Date: Mon, 16 Dec 2024 14:32:13 -0500 Subject: [PATCH] refactor(x/validate): add `nil` protection (#22902) --- x/validate/module.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/x/validate/module.go b/x/validate/module.go index f547e63fe085..2de32508591c 100644 --- a/x/validate/module.go +++ b/x/validate/module.go @@ -57,6 +57,10 @@ func (a AppModule) TxValidator(ctx context.Context, tx transaction.Tx) error { } } + if a.feeTxValidator == nil { + panic("feeTxValidator cannot be nil") + } + if err := a.feeTxValidator.ValidateTx(ctx, tx); err != nil { return err }