Skip to content

Commit

Permalink
fix: Do not emit Issued { amount: 0 } event
Browse files Browse the repository at this point in the history
  • Loading branch information
ShoyuVanilla committed Oct 7, 2024
1 parent 4bda956 commit 6398436
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion substrate/frame/balances/src/impl_fungible.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,9 @@ impl<T: Config<I>, I: 'static> fungible::Balanced<T::AccountId> for Pallet<T, I>
Self::deposit_event(Event::<T, I>::Withdraw { who: who.clone(), amount });
}
fn done_issue(amount: Self::Balance) {
Self::deposit_event(Event::<T, I>::Issued { amount });
if !amount.is_zero() {
Self::deposit_event(Event::<T, I>::Issued { amount });
}
}
fn done_rescind(amount: Self::Balance) {
Self::deposit_event(Event::<T, I>::Rescinded { amount });
Expand Down

0 comments on commit 6398436

Please sign in to comment.