Skip to content

Commit

Permalink
emit event when tokens transferred
Browse files Browse the repository at this point in the history
  • Loading branch information
AmbientTea committed Dec 13, 2024
1 parent 8cbb7e0 commit cfd12f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions toolkit/pallets/native-token-management/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ pub mod pallet {
}

#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
TokensTransfered(NativeTokenAmount),
}
Expand Down Expand Up @@ -151,6 +152,9 @@ pub mod pallet {
}
true
});

Self::deposit_event(Event::TokensTransfered(token_amount));

T::TokenTransferHandler::handle_token_transfer(token_amount)
}

Expand Down

0 comments on commit cfd12f4

Please sign in to comment.