Skip to content
Snippets Groups Projects
Unverified Commit 656963a0 authored by bgallois's avatar bgallois
Browse files

fix #220

parent 3240a1aa
No related branches found
No related tags found
No related merge requests found
Pipeline #36559 failed
...@@ -132,20 +132,20 @@ pub mod pallet { ...@@ -132,20 +132,20 @@ pub mod pallet {
pub enum Event<T: Config> { pub enum Event<T: Config> {
/// An identity is being inivited to become a smith. /// An identity is being inivited to become a smith.
InvitationSent { InvitationSent {
receiver: T::IdtyIndex,
issuer: T::IdtyIndex, issuer: T::IdtyIndex,
receiver: T::IdtyIndex,
}, },
/// The invitation has been accepted. /// The invitation has been accepted.
InvitationAccepted { idty_index: T::IdtyIndex }, InvitationAccepted { idty_index: T::IdtyIndex },
/// Certification received /// Certification received
SmithCertAdded { SmithCertAdded {
receiver: T::IdtyIndex,
issuer: T::IdtyIndex, issuer: T::IdtyIndex,
receiver: T::IdtyIndex,
}, },
/// Certification lost /// Certification lost
SmithCertRemoved { SmithCertRemoved {
receiver: T::IdtyIndex,
issuer: T::IdtyIndex, issuer: T::IdtyIndex,
receiver: T::IdtyIndex,
}, },
/// A smith gathered enough certifications to become an authority (can call `go_online()`). /// A smith gathered enough certifications to become an authority (can call `go_online()`).
SmithMembershipAdded { idty_index: T::IdtyIndex }, SmithMembershipAdded { idty_index: T::IdtyIndex },
...@@ -361,7 +361,7 @@ impl<T: Config> Pallet<T> { ...@@ -361,7 +361,7 @@ impl<T: Config> Pallet<T> {
existing.received_certs = vec![]; existing.received_certs = vec![];
Smiths::<T>::insert(receiver, existing); Smiths::<T>::insert(receiver, existing);
ExpiresOn::<T>::append(new_expires_on, receiver); ExpiresOn::<T>::append(new_expires_on, receiver);
Self::deposit_event(Event::<T>::InvitationSent { receiver, issuer }); Self::deposit_event(Event::<T>::InvitationSent { issuer, receiver });
} }
fn check_accept_invitation(receiver: T::IdtyIndex) -> DispatchResultWithPostInfo { fn check_accept_invitation(receiver: T::IdtyIndex) -> DispatchResultWithPostInfo {
...@@ -443,7 +443,7 @@ impl<T: Config> Pallet<T> { ...@@ -443,7 +443,7 @@ impl<T: Config> Pallet<T> {
// - adds a certification in receiver received list // - adds a certification in receiver received list
smith_meta.received_certs.push(issuer); smith_meta.received_certs.push(issuer);
smith_meta.received_certs.sort(); smith_meta.received_certs.sort();
Self::deposit_event(Event::<T>::SmithCertAdded { receiver, issuer }); Self::deposit_event(Event::<T>::SmithCertAdded { issuer, receiver });
// - receiving a certification either lead us to Pending or Smith status // - receiving a certification either lead us to Pending or Smith status
let previous_status = smith_meta.status; let previous_status = smith_meta.status;
...@@ -517,8 +517,8 @@ impl<T: Config> Pallet<T> { ...@@ -517,8 +517,8 @@ impl<T: Config> Pallet<T> {
if let Ok(index) = smith_meta.issued_certs.binary_search(&receiver) { if let Ok(index) = smith_meta.issued_certs.binary_search(&receiver) {
smith_meta.issued_certs.remove(index); smith_meta.issued_certs.remove(index);
Self::deposit_event(Event::<T>::SmithCertRemoved { Self::deposit_event(Event::<T>::SmithCertRemoved {
receiver,
issuer: lost_cert_issuer, issuer: lost_cert_issuer,
receiver,
}); });
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment