Skip to content

Commit

Permalink
chore: remove duplicate private method
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeseung-bae committed Feb 16, 2024
1 parent 1efcd88 commit eab6a0b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions x/bankplus/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func NewBaseKeeper(
}

keeper.BaseSendKeeper.AppendSendRestriction(func(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (newToAddr sdk.AccAddress, err error) {
if baseKeeper.isInactiveAddr(toAddr) {
if baseKeeper.IsInactiveAddr(toAddr) {
return nil, errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "%s is not allowed to receive funds", toAddr)
}
return toAddr, nil
Expand All @@ -67,14 +67,6 @@ func (k BaseKeeper) InitializeBankPlus(ctx context.Context) {
k.loadAllInactiveAddrs(ctx)
}

func (k BaseKeeper) isInactiveAddr(addr sdk.AccAddress) bool {
addrString, err := k.addrCdc.BytesToString(addr)
if err != nil {
panic(err)
}
return k.inactiveAddrs[addrString]
}

// AddToInactiveAddr adds the address to `inactiveAddr`.
func (k BaseKeeper) AddToInactiveAddr(ctx context.Context, addr sdk.AccAddress) {
addrString, err := k.addrCdc.BytesToString(addr)
Expand Down

0 comments on commit eab6a0b

Please sign in to comment.