Skip to content

Commit

Permalink
correct iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
GNaD13 committed Oct 25, 2023
1 parent e21200c commit 23577ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x/transfermiddleware/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"time"

errorsmod "cosmossdk.io/errors"
"cosmossdk.io/store/prefix"

Check failure on line 7 in x/transfermiddleware/keeper/keeper.go

View workflow job for this annotation

GitHub Actions / build

no required module provides package cosmossdk.io/store/prefix; to add it:

Check failure on line 7 in x/transfermiddleware/keeper/keeper.go

View workflow job for this annotation

GitHub Actions / test

no required module provides package cosmossdk.io/store/prefix; to add it:

Check failure on line 7 in x/transfermiddleware/keeper/keeper.go

View workflow job for this annotation

GitHub Actions / Analyze

no required module provides package cosmossdk.io/store/prefix; to add it:

Check failure on line 7 in x/transfermiddleware/keeper/keeper.go

View workflow job for this annotation

GitHub Actions / build

no required module provides package cosmossdk.io/store/prefix; to add it:
"github.com/cometbft/cometbft/libs/log"
"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
Expand Down Expand Up @@ -168,7 +169,8 @@ func (keeper Keeper) HasAllowRlyAddress(ctx sdk.Context, rlyAddress string) bool

func (keeper Keeper) IterateAllowRlyAddress(ctx sdk.Context, cb func(rlyAddress string) (stop bool)) {
store := ctx.KVStore(keeper.storeKey)
iterator := sdk.KVStorePrefixIterator(store, types.KeyRlyAddress)
prefixStore := prefix.NewStore(store, types.KeyRlyAddress)
iterator := sdk.KVStorePrefixIterator(prefixStore, nil)

defer iterator.Close()
for ; iterator.Valid(); iterator.Next() {
Expand Down

0 comments on commit 23577ab

Please sign in to comment.