Skip to content

Commit

Permalink
fix: initialize feegrant keeper reference for feegrant decorator
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian committed May 26, 2024
1 parent 4f77ed7 commit f3b0208
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "custom akash governance keeper is required for ante builder")
}

if options.FeegrantKeeper == nil {
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "akash feegrant keeper is required for ante builder")
}

anteDecorators := []sdk.AnteDecorator{
ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first
ante.NewRejectExtensionOptionsDecorator(),
Expand Down
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ func NewApp(
HandlerOptions: ante.HandlerOptions{
AccountKeeper: app.Keepers.Cosmos.Acct,
BankKeeper: app.Keepers.Cosmos.Bank,
FeegrantKeeper: app.Keepers.Cosmos.FeeGrant,
SignModeHandler: encodingConfig.TxConfig.SignModeHandler(),
SigGasConsumer: ante.DefaultSigVerificationGasConsumer,
},
Expand Down

0 comments on commit f3b0208

Please sign in to comment.