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:
David Salami
2021-11-16 02:56:00 +01:00
committed by GitHub
parent fb3c7326c2
commit 120894fdb7
48 changed files with 1181 additions and 681 deletions
+4 -4
View File
@@ -176,9 +176,9 @@ pub mod pallet {
/// A new set of calls have been set!
CallsUpdated,
/// A winner has been chosen!
Winner(T::AccountId, BalanceOf<T>),
Winner { winner: T::AccountId, lottery_balance: BalanceOf<T> },
/// A ticket has been bought!
TicketBought(T::AccountId, CallIndex),
TicketBought { who: T::AccountId, call_index: CallIndex },
}
#[pallet::error]
@@ -250,7 +250,7 @@ pub mod pallet {
);
debug_assert!(res.is_ok());
Self::deposit_event(Event::<T>::Winner(winner, lottery_balance));
Self::deposit_event(Event::<T>::Winner { winner, lottery_balance });
TicketsCount::<T>::kill();
@@ -452,7 +452,7 @@ impl<T: Config> Pallet<T> {
},
)?;
Self::deposit_event(Event::<T>::TicketBought(caller.clone(), call_index));
Self::deposit_event(Event::<T>::TicketBought { who: caller.clone(), call_index });
Ok(())
}