From 4268af19ec49f93ba5c4354805f6bb5b68b12bea Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Wed, 17 Feb 2021 09:36:28 +0000 Subject: [PATCH] feat: add recipient field to ItemCreated event --- --- a/pallets/nft/src/lib.rs +++ b/pallets/nft/src/lib.rs @@ -495,7 +495,9 @@ /// * collection_id: Id of the collection where item was created. /// /// * item_id: Id of an item. Unique within the collection. - ItemCreated(CollectionId, TokenId), + /// + /// * recipient: Owner of newly created item + ItemCreated(CollectionId, TokenId, AccountId), /// Collection item was burned. /// @@ -1635,7 +1637,7 @@ { CreateItemData::NFT(data) => { let item = NftItemType { - owner, + owner: owner.clone(), const_data: data.const_data, variable_data: data.variable_data }; @@ -1660,7 +1662,7 @@ }; // call event - Self::deposit_event(RawEvent::ItemCreated(collection_id, ::get(collection_id))); + Self::deposit_event(RawEvent::ItemCreated(collection_id, ::get(collection_id), owner)); Ok(()) } -- gitstuff