Skip to content

Commit

Permalink
Merge pull request #12 from Peersyst/issue/kek-02
Browse files Browse the repository at this point in the history
[TA-2049] KEK-02: Add Missing Validation of Authority Account in `NewKeeper()`
  • Loading branch information
AdriaCarrera authored Jan 23, 2024
2 parents 0604443 + 72ce6bf commit 1931a6a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions x/poa/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package keeper

import (
"fmt"

"github.com/cometbft/cometbft/libs/log"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -37,6 +38,11 @@ func NewKeeper(
ps = ps.WithKeyTable(types.ParamKeyTable())
}

_, err := sdk.AccAddressFromBech32(authority)
if err != nil {
panic(err)
}

return &Keeper{
cdc: cdc,
paramstore: ps,
Expand Down

0 comments on commit 1931a6a

Please sign in to comment.