Skip to content

Commit

Permalink
fix nil convert
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Jul 14, 2024
1 parent 8f4029f commit 9643d43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion x/auth/ante/sigverify.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,10 @@ func (svd SigVerificationDecorator) anteHandle(ctx sdk.Context, tx sdk.Tx, simul

func (svd SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) {
if v, ok := ctx.GetIncarnationCache(SigVerificationResultCacheKey); ok {
err = v.(error)
// can't convert `nil` to interface
if v != nil {
err = v.(error)
}
} else {
err = svd.anteHandle(ctx, tx, simulate)
ctx.SetIncarnationCache(SigVerificationResultCacheKey, err)
Expand Down

0 comments on commit 9643d43

Please sign in to comment.