mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 19:01:08 +00:00
Change order of events emitted from transfer. (#4301)
This commit is contained in:
committed by
Gavin Wood
parent
af3fc1d95a
commit
5e6f339a97
@@ -934,9 +934,14 @@ where
|
||||
if !<FreeBalance<T, I>>::exists(dest) {
|
||||
Self::new_account(dest, new_to_balance);
|
||||
}
|
||||
|
||||
// Emit transfer event.
|
||||
Self::deposit_event(RawEvent::Transfer(transactor.clone(), dest.clone(), value, fee));
|
||||
|
||||
// Take action on the set_free_balance call.
|
||||
// This will emit events that _resulted_ from the transfer.
|
||||
Self::set_free_balance(dest, new_to_balance);
|
||||
T::TransferPayment::on_unbalanced(NegativeImbalance::new(fee));
|
||||
Self::deposit_event(RawEvent::Transfer(transactor.clone(), dest.clone(), value, fee));
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user