Skip to content

Commit d8a9e7f

Browse files
committed
refactor(nft): rename OwnersPrefix to NFTsByOwnerPrefix
1 parent ed1caf0 commit d8a9e7f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

x/nft/keeper/grpc_query.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func (k Keeper) AllNftsByOwner(ctx context.Context, req *types.QueryAllNftsByOwn
147147

148148
store := prefix.NewStore(
149149
sdkCtx.KVStore(k.storeKey),
150-
append(types.OwnersPrefix, address.MustLengthPrefix(owner)...),
150+
append(types.NFTsByOwnerPrefix, address.MustLengthPrefix(owner)...),
151151
)
152152

153153
var nfts []types.Nft

x/nft/keeper/keeper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ func newNFTIndexes(sb *collections.SchemaBuilder) NFTIndexes {
3232
),
3333
Owner: indexes.NewMulti(
3434
sb,
35-
types.OwnersPrefix,
36-
"owners",
35+
types.NFTsByOwnerPrefix,
36+
"nfts_by_owner",
3737
sdk.AccAddressKey,
3838
collections.PairKeyCodec(collections.StringKey, collections.StringKey),
3939
func(pk collections.Pair[string, string], v types.Nft) (sdk.AccAddress, error) {

x/nft/types/keys.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ var (
1313
SupplyPrefix = collections.NewPrefix(1)
1414
NFTsPrefix = collections.NewPrefix(2)
1515
NFTsByCollectionPrefix = collections.NewPrefix(3)
16-
OwnersPrefix = collections.NewPrefix(4)
16+
NFTsByOwnerPrefix = collections.NewPrefix(4)
1717
)

0 commit comments

Comments
 (0)