diff --git a/proto/lbm/collection/v1/collection.proto b/proto/lbm/collection/v1/collection.proto index 96be2977cc..70cf6e0b4a 100644 --- a/proto/lbm/collection/v1/collection.proto +++ b/proto/lbm/collection/v1/collection.proto @@ -10,7 +10,7 @@ import "cosmos_proto/cosmos.proto"; // Params defines the parameters for the collection module. message Params { - reserved 1 to 2; + reserved 1 to 2; // depth_limit, width_limit } // Contract defines the information of the contract for the collection. diff --git a/proto/lbm/collection/v1/genesis.proto b/proto/lbm/collection/v1/genesis.proto index dab5eb6aa1..658bb633b4 100644 --- a/proto/lbm/collection/v1/genesis.proto +++ b/proto/lbm/collection/v1/genesis.proto @@ -32,7 +32,7 @@ message GenesisState { // nfts is an array containing the nfts. repeated ContractNFTs nfts = 7 [(gogoproto.nullable) = false]; - reserved 8; + reserved 8; // parents // grants defines the grant information. repeated ContractGrants grants = 9 [(gogoproto.nullable) = false]; @@ -125,7 +125,7 @@ message NextClassIDs { // contract id associated with the contract. string contract_id = 1; - reserved 2; + reserved 2; // fungible // id for the non-fungible tokens. string non_fungible = 3 [ diff --git a/x/collection/keeper/migrations/v3/store.go b/x/collection/keeper/migrations/v3/store.go index 67f60d6c3b..1a51392986 100644 --- a/x/collection/keeper/migrations/v3/store.go +++ b/x/collection/keeper/migrations/v3/store.go @@ -39,7 +39,7 @@ func migrateClassStateAndRemoveLegacyState(collectionStore, oldStore storetypes. newClassStore.Set(idKey(id), []byte{}) oldStore.Delete(idKey(id)) - detachNFT(collectionStore, cdc, id) + detachNFTs(collectionStore, cdc, id) removeFTs(collectionStore, cdc, id) } @@ -57,7 +57,7 @@ func migrateClassStateAndRemoveLegacyState(collectionStore, oldStore storetypes. return nil } -func detachNFT(store storetypes.KVStore, cdc codec.BinaryCodec, id string) { +func detachNFTs(store storetypes.KVStore, cdc codec.BinaryCodec, id string) { iterator := storetypes.KVStorePrefixIterator(store, parentKeyPrefixByContractID(id)) defer iterator.Close() @@ -69,7 +69,7 @@ func detachNFT(store storetypes.KVStore, cdc codec.BinaryCodec, id string) { var parentID gogotypes.StringValue cdc.MustUnmarshal(iterator.Value(), &parentID) - addCoin(store, id, getRootOwner(store, cdc, contractID, tokenID), collection.NewCoin(tokenID, cmath.OneInt())) + addCoin(store, id, getRootOwner(store, cdc, contractID, parentID.Value), collection.NewCoin(tokenID, cmath.OneInt())) store.Delete(parentKey(contractID, tokenID)) store.Delete(childKey(contractID, parentID.Value, tokenID)) @@ -119,7 +119,7 @@ func removeFTBalances(store storetypes.KVStore, contractID, ftID string) { for ; iterator.Valid(); iterator.Next() { id, address, tokenID := splitBalanceKey(iterator.Key()) if id != contractID { - panic(fmt.Sprintf("v3 migration: inconsistent ContractID, got: %s, expeted: %s", id, contractID)) + panic(fmt.Sprintf("v3 migration: inconsistent ContractID, got: %s, expected: %s", id, contractID)) } if tokenID == ftID {