pallet_assets : Remove event for no_op (#11023)

* remove no_op event

* ensure no transferred event emitted

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
stanly-johnson
2022-04-14 23:41:42 +04:00
committed by GitHub
parent c56e8f684f
commit 7dca0e467c
2 changed files with 3 additions and 13 deletions
+1 -7
View File
@@ -529,14 +529,8 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
maybe_need_admin: Option<T::AccountId>,
f: TransferFlags,
) -> Result<(T::Balance, Option<DeadConsequence>), DispatchError> {
// Early exist if no-op.
// Early exit if no-op.
if amount.is_zero() {
Self::deposit_event(Event::Transferred {
asset_id: id,
from: source.clone(),
to: dest.clone(),
amount,
});
return Ok((amount, None))
}