git.delta.rocks / unique-network / refs/commits / 7b0bdf5b5037

difftreelog

Merge pull request #136 from usetech-llc/feature/NFTPAR-388

usetech-llc2021-03-23parents: #c1873db #84b418d.patch.diff
in: master
Update getCreateCollectionResult()

2 files changed

modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
--- a/pallets/nft/src/lib.rs
+++ b/pallets/nft/src/lib.rs
@@ -621,7 +621,7 @@
         /// * mode: [CollectionMode] converted into u8.
         /// 
         /// * account_id: Collection owner.
-        Created(CollectionId, u8, AccountId),
+        CollectionCreated(CollectionId, u8, AccountId),
 
         /// New item was created.
         /// 
@@ -774,7 +774,7 @@
             <CollectionById<T>>::insert(next_id, new_collection);
 
             // call event
-            Self::deposit_event(RawEvent::Created(next_id, mode.into(), who.clone()));
+            Self::deposit_event(RawEvent::CollectionCreated(next_id, mode.into(), who.clone()));
 
             Ok(())
         }
modifiedtests/src/util/helpers.tsdiffbeforeafterboth
118 // console.log(` ${phase}: ${section}.${method}:: ${data}`);118 // console.log(` ${phase}: ${section}.${method}:: ${data}`);
119 if (method == 'ExtrinsicSuccess') {119 if (method == 'ExtrinsicSuccess') {
120 success = true;120 success = true;
121 } else if ((section == 'nft') && (method == 'Created')) {121 } else if ((section == 'nft') && (method == 'CollectionCreated')) {
122 collectionId = parseInt(data[0].toString());122 collectionId = parseInt(data[0].toString());
123 }123 }
124 });124 });