Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
remove duplicate Issued/Burned events (paritytech#8935)
Browse files Browse the repository at this point in the history
  • Loading branch information
joepetrowski authored and nazar-pc committed Aug 8, 2021
1 parent 9aa3812 commit c65412c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions frame/assets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ pub mod pallet {
/// - `beneficiary`: The account to be credited with the minted assets.
/// - `amount`: The amount of the asset to be minted.
///
/// Emits `Destroyed` event when successful.
/// Emits `Issued` event when successful.
///
/// Weight: `O(1)`
/// Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`.
Expand All @@ -539,7 +539,6 @@ pub mod pallet {
let origin = ensure_signed(origin)?;
let beneficiary = T::Lookup::lookup(beneficiary)?;
Self::do_mint(id, &beneficiary, amount, Some(origin))?;
Self::deposit_event(Event::Issued(id, beneficiary, amount));
Ok(())
}

Expand Down Expand Up @@ -569,8 +568,7 @@ pub mod pallet {
let who = T::Lookup::lookup(who)?;

let f = DebitFlags { keep_alive: false, best_effort: true };
let burned = Self::do_burn(id, &who, amount, Some(origin), f)?;
Self::deposit_event(Event::Burned(id, who, burned));
let _ = Self::do_burn(id, &who, amount, Some(origin), f)?;
Ok(())
}

Expand Down

0 comments on commit c65412c

Please sign in to comment.