Migrate some Pallets to Named Events (#5423)

* auctions

* claims

* registrar

* Update purchase.rs

* crowdloan

* slots

* comma
This commit is contained in:
Shawn Tabrizi
2022-05-13 12:49:19 -04:00
committed by GitHub
parent 511891dcce
commit 432cae1a2b
7 changed files with 169 additions and 123 deletions
+7 -3
View File
@@ -183,8 +183,8 @@ pub mod pallet {
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
/// Someone claimed some DOTs. `[who, ethereum_address, amount]`
Claimed(T::AccountId, EthereumAddress, BalanceOf<T>),
/// Someone claimed some DOTs.
Claimed { who: T::AccountId, ethereum_address: EthereumAddress, amount: BalanceOf<T> },
}
#[pallet::error]
@@ -581,7 +581,11 @@ impl<T: Config> Pallet<T> {
Signing::<T>::remove(&signer);
// Let's deposit an event to let the outside world know this happened.
Self::deposit_event(Event::<T>::Claimed(dest, signer, balance_due));
Self::deposit_event(Event::<T>::Claimed {
who: dest,
ethereum_address: signer,
amount: balance_due,
});
Ok(())
}