refactor(x/validate): add nil protection (#22902)

This commit is contained in:
Alex | Skip 2024-12-16 14:32:13 -05:00 committed by GitHub
parent c6b1bdcd56
commit f14cbd2584
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
}