mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 00:01:09 +00:00
Add field names to pallet Event variants (#9993)
* convert pallet-assets events to struct types * updated events of a couple pallets * updated pallet event field names * update pallet event field names * updated events in test files * cargo fmt * minorfixes * fix assertion error * minor fix * formatting fix * fmt
This commit is contained in:
@@ -291,8 +291,7 @@ pub mod pallet {
|
||||
#[pallet::generate_deposit(pub(super) fn deposit_event)]
|
||||
pub enum Event<T: Config> {
|
||||
/// Event generated when new price is accepted to contribute to the average.
|
||||
/// \[price, who\]
|
||||
NewPrice(u32, T::AccountId),
|
||||
NewPrice { price: u32, who: T::AccountId },
|
||||
}
|
||||
|
||||
#[pallet::validate_unsigned]
|
||||
@@ -658,7 +657,7 @@ impl<T: Config> Pallet<T> {
|
||||
.expect("The average is not empty, because it was just mutated; qed");
|
||||
log::info!("Current average price is: {}", average);
|
||||
// here we are raising the NewPrice event
|
||||
Self::deposit_event(Event::NewPrice(price, who));
|
||||
Self::deposit_event(Event::NewPrice { price, who });
|
||||
}
|
||||
|
||||
/// Calculate current average price.
|
||||
|
||||
Reference in New Issue
Block a user