Skip to content

Commit

Permalink
chore: remove deprecate uses of sdkerrors (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangdv2429 authored Mar 22, 2024
1 parent 7db44b0 commit 3c6ace8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
ibcante "github.com/cosmos/ibc-go/v6/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"

errorsmod "cosmossdk.io/errors"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
)
Expand Down Expand Up @@ -58,19 +59,19 @@ func GetAnteDecorators(options HandlerOptions) []sdk.AnteDecorator {
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
//From x/auth/ante.go
if options.AccountKeeper == nil {
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "account keeper is required for ante builder")
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "account keeper is required for ante builder")
}

if options.BankKeeper == nil {
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "bank keeper is required for ante builder")
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "bank keeper is required for ante builder")
}

if options.SignModeHandler == nil {
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder")
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder")
}

if options.WasmConfig == nil {
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "wasm config is required for ante builder")
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "wasm config is required for ante builder")
}

return sdk.ChainAnteDecorators(GetAnteDecorators(options)...), nil
Expand Down

0 comments on commit 3c6ace8

Please sign in to comment.