mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
Add CallbackHandle to pallet-assets (#12307)
* Add CallbackHandle to pallet-assets * Address review comments * Add use for sp_io::storage * Rebase & review comments * Fix UT Co-authored-by: Hoon Kim <mail@hoonkim.me>
This commit is contained in:
@@ -664,7 +664,8 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
status: AssetStatus::Live,
|
||||
},
|
||||
);
|
||||
Self::deposit_event(Event::ForceCreated { asset_id: id, owner });
|
||||
Self::deposit_event(Event::ForceCreated { asset_id: id, owner: owner.clone() });
|
||||
T::CallbackHandle::created(&id, &owner);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -754,6 +755,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
approvals_destroyed: removed_approvals as u32,
|
||||
approvals_remaining: details.approvals as u32,
|
||||
});
|
||||
T::CallbackHandle::destroyed(&id);
|
||||
Ok(())
|
||||
})?;
|
||||
Ok(removed_approvals)
|
||||
|
||||
Reference in New Issue
Block a user