[NTFs] Emit CollectionMaxSupplySet on collection create (#2626)

Closes #2293 

if the max_supply is set during the collection creation, we emit the
`CollectionMaxSupplySet` event
This commit is contained in:
Jegor Sidorenko
2023-12-08 12:26:13 +02:00
committed by GitHub
parent f5edd4f4da
commit 1bdfb29587
2 changed files with 33 additions and 1 deletions
@@ -66,7 +66,13 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
CollectionConfigOf::<T, I>::insert(&collection, config);
CollectionAccount::<T, I>::insert(&owner, &collection, ());
Self::deposit_event(event);
if let Some(max_supply) = config.max_supply {
Self::deposit_event(Event::CollectionMaxSupplySet { collection, max_supply });
}
Ok(())
}