Browse Source

Restore events for the hiring flow extrinsics

-restore events for the hiring flow extrinsics in the bureaucracy module
Shamil Gadelshin 4 years ago
parent
commit
37bd5a2c82

+ 19 - 4
runtime-modules/bureaucracy/src/lib.rs

@@ -101,13 +101,28 @@ decl_event!(
     pub enum Event<T, I>
     where
         <T as membership::members::Trait>::MemberId,
-        <T as system::Trait>::AccountId
+        <T as system::Trait>::AccountId,
+        CuratorOpeningId = CuratorOpeningId<T>,
+        CuratorApplicationId = CuratorApplicationId<T>,
     {
         /// Emits on setting the leader.
         /// Params:
         /// - Member id of the leader.
         /// - Role account id of the leader.
         LeaderSet(MemberId, AccountId),
+        /// Emits on adding new curator opening.
+        /// Params:
+        /// - Curator opening id
+        CuratorOpeningAdded(CuratorOpeningId),
+        /// Emits on accepting application for the curator opening.
+        /// Params:
+        /// - Curator opening id
+        AcceptedCuratorApplications(CuratorOpeningId),
+        /// Emits on adding the application for the curator opening.
+        /// Params:
+        /// - Curator opening id
+        /// - Curator application id
+        AppliedOnCuratorOpening(CuratorOpeningId, CuratorApplicationId),
     }
 );
 
@@ -203,7 +218,7 @@ decl_module! {
             NextCuratorOpeningId::<T, I>::mutate(|id| *id += <CuratorOpeningId<T> as One>::one());
 
             // Trigger event
-            //Self::deposit_event(RawEvent::CuratorOpeningAdded(new_curator_opening_id));
+            Self::deposit_event(RawEvent::CuratorOpeningAdded(new_curator_opening_id));
         }
 
             /// Begin accepting curator applications to an opening that is active.
@@ -229,7 +244,7 @@ decl_module! {
 
 
             // Trigger event
-            // Self::deposit_event(RawEvent::AcceptedCuratorApplications(curator_opening_id));
+            Self::deposit_event(RawEvent::AcceptedCuratorApplications(curator_opening_id));
         }
 
         /// Apply on a curator opening.
@@ -318,7 +333,7 @@ decl_module! {
             });
 
             // Trigger event
-            //Self::deposit_event(RawEvent::AppliedOnCuratorOpening(curator_opening_id, new_curator_application_id));
+            Self::deposit_event(RawEvent::AppliedOnCuratorOpening(curator_opening_id, new_curator_application_id));
         }
     }
 }

+ 1 - 1
runtime-modules/bureaucracy/src/tests/mod.rs

@@ -8,7 +8,7 @@ use system::{EventRecord, Phase};
 
 struct EventFixture;
 impl EventFixture {
-    fn assert_events(expected_raw_events: Vec<RawEvent<u64, u64, crate::Instance1>>) {
+    fn assert_events(expected_raw_events: Vec<RawEvent<u64, u64, u64, u64, crate::Instance1>>) {
         let expected_events = expected_raw_events
             .iter()
             .map(|ev| EventRecord {

+ 137 - 138
runtime-modules/bureaucracy/src/wrapped_error.rs

@@ -1,6 +1,5 @@
 use membership::members;
 
-
 /*
  * The errors below, while in many cases encoding similar outcomes,
  * are scoped to the specific extrinsic for which they are used.
@@ -12,84 +11,84 @@ use membership::members;
 // Errors for `accept_curator_applications`
 pub static MSG_ACCEPT_CURATOR_APPLICATIONS_OPENING_DOES_NOT_EXIST: &str = "Opening does not exist";
 pub static MSG_ACCEPT_CURATOR_APPLICATIONS_OPENING_IS_NOT_WAITING_TO_BEGIN: &str =
-	"Opening Is Not in Waiting to begin";
+    "Opening Is Not in Waiting to begin";
 
 // Errors for `begin_curator_applicant_review`
 pub static MSG_BEGIN_CURATOR_APPLICANT_REVIEW_OPENING_DOES_NOT_EXIST: &str =
-	"Opening does not exist";
+    "Opening does not exist";
 pub static MSG_BEGIN_CURATOR_APPLICANT_REVIEW_OPENING_OPENING_IS_NOT_WAITING_TO_BEGIN: &str =
-	"Opening Is Not in Waiting";
+    "Opening Is Not in Waiting";
 
 // Errors for `fill_curator_opening`
 pub static MSG_FULL_CURATOR_OPENING_OPENING_DOES_NOT_EXIST: &str = "OpeningDoesNotExist";
 pub static MSG_FULL_CURATOR_OPENING_OPENING_NOT_IN_REVIEW_PERIOD_STAGE: &str =
-	"OpeningNotInReviewPeriodStage";
+    "OpeningNotInReviewPeriodStage";
 pub static MSG_FULL_CURATOR_OPENING_UNSUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_TOO_SHORT:
-&str = "Application stake unstaking period for successful applicants too short";
+    &str = "Application stake unstaking period for successful applicants too short";
 pub static MSG_FULL_CURATOR_OPENING_SUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_TOO_SHORT: &str =
-	"Application stake unstaking period for failed applicants too short";
+    "Application stake unstaking period for failed applicants too short";
 pub static MSG_FULL_CURATOR_OPENING_SUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_TOO_SHORT: &str =
-	"Role stake unstaking period for successful applicants too short";
+    "Role stake unstaking period for successful applicants too short";
 pub static MSG_FULL_CURATOR_OPENING_UNSUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_TOO_SHORT: &str =
-	"Role stake unstaking period for failed applicants too short";
+    "Role stake unstaking period for failed applicants too short";
 pub static MSG_FULL_CURATOR_OPENING_SUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_REDUNDANT: &str =
-	"Application stake unstaking period for successful applicants redundant";
+    "Application stake unstaking period for successful applicants redundant";
 pub static MSG_FULL_CURATOR_OPENING_UNSUCCESSFUL_APPLICATION_STAKE_UNSTAKING_PERIOD_REDUNDANT:
-&str = "Application stake unstaking period for failed applicants redundant";
+    &str = "Application stake unstaking period for failed applicants redundant";
 pub static MSG_FULL_CURATOR_OPENING_SUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_REDUNDANT: &str =
-	"Role stake unstaking period for successful applicants redundant";
+    "Role stake unstaking period for successful applicants redundant";
 pub static MSG_FULL_CURATOR_OPENING_UNSUCCESSFUL_ROLE_STAKE_UNSTAKING_PERIOD_REDUNDANT: &str =
-	"Role stake unstaking period for failed applicants redundant";
+    "Role stake unstaking period for failed applicants redundant";
 pub static MSG_FULL_CURATOR_OPENING_APPLICATION_DOES_NOT_EXIST: &str = "ApplicationDoesNotExist";
 pub static MSG_FULL_CURATOR_OPENING_APPLICATION_NOT_ACTIVE: &str = "ApplicationNotInActiveStage";
 pub static MSG_FILL_CURATOR_OPENING_APPLICATION_FOR_WRONG_OPENING: &str =
-	"Applications not for opening";
+    "Applications not for opening";
 // Errors for `withdraw_curator_application`
 pub static MSG_WITHDRAW_CURATOR_APPLICATION_APPLICATION_DOES_NOT_EXIST: &str =
-	"ApplicationDoesNotExist";
+    "ApplicationDoesNotExist";
 pub static MSG_WITHDRAW_CURATOR_APPLICATION_APPLICATION_NOT_ACTIVE: &str = "ApplicationNotActive";
 pub static MSG_WITHDRAW_CURATOR_APPLICATION_OPENING_NOT_ACCEPTING_APPLICATIONS: &str =
-	"OpeningNotAcceptingApplications";
+    "OpeningNotAcceptingApplications";
 pub static MSG_WITHDRAW_CURATOR_APPLICATION_UNSTAKING_PERIOD_TOO_SHORT: &str =
-	"UnstakingPeriodTooShort ..."; // <== SHOULD REALLY BE TWO SEPARATE, ONE FOR EACH STAKING PURPOSE
+    "UnstakingPeriodTooShort ..."; // <== SHOULD REALLY BE TWO SEPARATE, ONE FOR EACH STAKING PURPOSE
 pub static MSG_WITHDRAW_CURATOR_APPLICATION_REDUNDANT_UNSTAKING_PERIOD: &str =
-	"RedundantUnstakingPeriodProvided ...";
+    "RedundantUnstakingPeriodProvided ...";
 
 // Errors for `create_channel`
 pub static MSG_CREATE_CHANNEL_IS_NOT_MEMBER: &str = "Is not a member";
 pub static MSG_CREATE_CHANNEL_NOT_CONTROLLER_ACCOUNT: &str =
-	"Account is not controller account of member";
+    "Account is not controller account of member";
 
 // Errors for `add_curator_opening`
 pub static MSG_ADD_CURATOR_OPENING_ACTIVATES_IN_THE_PAST: &str =
-	"Opening does not activate in the future";
+    "Opening does not activate in the future";
 pub static MSG_ADD_CURATOR_OPENING_ROLE_STAKE_LESS_THAN_MINIMUM: &str =
-	"Role stake amount less than minimum currency balance";
+    "Role stake amount less than minimum currency balance";
 pub static MSG_ADD_CURATOR_OPENING_APPLIICATION_STAKE_LESS_THAN_MINIMUM: &str =
-	"Application stake amount less than minimum currency balance";
+    "Application stake amount less than minimum currency balance";
 pub static MSG_ADD_CURATOR_OPENING_OPENING_DOES_NOT_EXIST: &str = "OpeningDoesNotExist";
 pub static MSG_ADD_CURATOR_OPENING_STAKE_PROVIDED_WHEN_REDUNDANT: &str =
-	"StakeProvidedWhenRedundant ..."; // <== SHOULD REALLY BE TWO SEPARATE, ONE FOR EACH STAKING PURPOSE
+    "StakeProvidedWhenRedundant ..."; // <== SHOULD REALLY BE TWO SEPARATE, ONE FOR EACH STAKING PURPOSE
 pub static MSG_ADD_CURATOR_OPENING_STAKE_MISSING_WHEN_REQUIRED: &str =
-	"StakeMissingWhenRequired ..."; // <== SHOULD REALLY BE TWO SEPARATE, ONE FOR EACH STAKING PURPOSE
+    "StakeMissingWhenRequired ..."; // <== SHOULD REALLY BE TWO SEPARATE, ONE FOR EACH STAKING PURPOSE
 pub static MSG_ADD_CURATOR_OPENING_STAKE_AMOUNT_TOO_LOW: &str = "StakeAmountTooLow ..."; // <== SHOULD REALLY BE TWO SEPARATE, ONE FOR EACH STAKING PURPOSE
 pub static MSG_ADD_CURATOR_OPENING_OPENING_NOT_IN_ACCEPTING_APPLICATION_STAGE: &str =
-	"OpeningNotInAcceptingApplicationsStage";
+    "OpeningNotInAcceptingApplicationsStage";
 pub static MSG_ADD_CURATOR_OPENING_NEW_APPLICATION_WAS_CROWDED_OUT: &str =
-	"NewApplicationWasCrowdedOut";
+    "NewApplicationWasCrowdedOut";
 pub static MSG_ADD_CURATOR_OPENING_ZERO_MAX_APPLICANT_COUNT: &str =
-	"Application rationing has zero max active applicants";
+    "Application rationing has zero max active applicants";
 
 // Errors for `apply_on_curator_opening`
 pub static MSG_APPLY_ON_CURATOR_OPENING_UNSIGNED_ORIGIN: &str = "Unsigned origin";
 pub static MSG_APPLY_ON_CURATOR_OPENING_MEMBER_ID_INVALID: &str = "Member id is invalid";
 pub static MSG_APPLY_ON_CURATOR_OPENING_SIGNER_NOT_CONTROLLER_ACCOUNT: &str =
-	"Signer does not match controller account";
+    "Signer does not match controller account";
 
 /// Error wrapper for external module error conversions
 pub struct WrappedError<E> {
-	// can this be made generic, or does that undermine the whole orhpan rule spirit?
-	pub error: E,
+    // can this be made generic, or does that undermine the whole orhpan rule spirit?
+    pub error: E,
 }
 
 #[macro_export]
@@ -104,57 +103,57 @@ macro_rules! ensure_on_wrapped_error {
 //derive_from_impl(hiring::BeginAcceptingApplicationsError)
 
 impl rstd::convert::From<WrappedError<hiring::BeginAcceptingApplicationsError>> for &str {
-	fn from(wrapper: WrappedError<hiring::BeginAcceptingApplicationsError>) -> Self {
-		match wrapper.error {
-			hiring::BeginAcceptingApplicationsError::OpeningDoesNotExist => {
-				MSG_ACCEPT_CURATOR_APPLICATIONS_OPENING_DOES_NOT_EXIST
-			}
-			hiring::BeginAcceptingApplicationsError::OpeningIsNotInWaitingToBeginStage => {
-				MSG_ACCEPT_CURATOR_APPLICATIONS_OPENING_IS_NOT_WAITING_TO_BEGIN
-			}
-		}
-	}
+    fn from(wrapper: WrappedError<hiring::BeginAcceptingApplicationsError>) -> Self {
+        match wrapper.error {
+            hiring::BeginAcceptingApplicationsError::OpeningDoesNotExist => {
+                MSG_ACCEPT_CURATOR_APPLICATIONS_OPENING_DOES_NOT_EXIST
+            }
+            hiring::BeginAcceptingApplicationsError::OpeningIsNotInWaitingToBeginStage => {
+                MSG_ACCEPT_CURATOR_APPLICATIONS_OPENING_IS_NOT_WAITING_TO_BEGIN
+            }
+        }
+    }
 }
 
 impl rstd::convert::From<WrappedError<hiring::AddOpeningError>> for &str {
-	fn from(wrapper: WrappedError<hiring::AddOpeningError>) -> Self {
-		match wrapper.error {
-			hiring::AddOpeningError::OpeningMustActivateInTheFuture => {
-				MSG_ADD_CURATOR_OPENING_ACTIVATES_IN_THE_PAST
-			}
-			hiring::AddOpeningError::StakeAmountLessThanMinimumCurrencyBalance(purpose) => {
-				match purpose {
-					hiring::StakePurpose::Role => {
-						MSG_ADD_CURATOR_OPENING_ROLE_STAKE_LESS_THAN_MINIMUM
-					}
-					hiring::StakePurpose::Application => {
-						MSG_ADD_CURATOR_OPENING_APPLIICATION_STAKE_LESS_THAN_MINIMUM
-					}
-				}
-			}
-			hiring::AddOpeningError::ApplicationRationingZeroMaxApplicants => {
-				MSG_ADD_CURATOR_OPENING_ZERO_MAX_APPLICANT_COUNT
-			}
-		}
-	}
+    fn from(wrapper: WrappedError<hiring::AddOpeningError>) -> Self {
+        match wrapper.error {
+            hiring::AddOpeningError::OpeningMustActivateInTheFuture => {
+                MSG_ADD_CURATOR_OPENING_ACTIVATES_IN_THE_PAST
+            }
+            hiring::AddOpeningError::StakeAmountLessThanMinimumCurrencyBalance(purpose) => {
+                match purpose {
+                    hiring::StakePurpose::Role => {
+                        MSG_ADD_CURATOR_OPENING_ROLE_STAKE_LESS_THAN_MINIMUM
+                    }
+                    hiring::StakePurpose::Application => {
+                        MSG_ADD_CURATOR_OPENING_APPLIICATION_STAKE_LESS_THAN_MINIMUM
+                    }
+                }
+            }
+            hiring::AddOpeningError::ApplicationRationingZeroMaxApplicants => {
+                MSG_ADD_CURATOR_OPENING_ZERO_MAX_APPLICANT_COUNT
+            }
+        }
+    }
 }
 
 impl rstd::convert::From<WrappedError<hiring::BeginReviewError>> for &str {
-	fn from(wrapper: WrappedError<hiring::BeginReviewError>) -> Self {
-		match wrapper.error {
-			hiring::BeginReviewError::OpeningDoesNotExist => {
-				MSG_BEGIN_CURATOR_APPLICANT_REVIEW_OPENING_DOES_NOT_EXIST
-			}
-			hiring::BeginReviewError::OpeningNotInAcceptingApplicationsStage => {
-				MSG_BEGIN_CURATOR_APPLICANT_REVIEW_OPENING_OPENING_IS_NOT_WAITING_TO_BEGIN
-			}
-		}
-	}
+    fn from(wrapper: WrappedError<hiring::BeginReviewError>) -> Self {
+        match wrapper.error {
+            hiring::BeginReviewError::OpeningDoesNotExist => {
+                MSG_BEGIN_CURATOR_APPLICANT_REVIEW_OPENING_DOES_NOT_EXIST
+            }
+            hiring::BeginReviewError::OpeningNotInAcceptingApplicationsStage => {
+                MSG_BEGIN_CURATOR_APPLICANT_REVIEW_OPENING_OPENING_IS_NOT_WAITING_TO_BEGIN
+            }
+        }
+    }
 }
 
 impl<T: hiring::Trait> rstd::convert::From<WrappedError<hiring::FillOpeningError<T>>> for &str {
-	fn from(wrapper: WrappedError<hiring::FillOpeningError<T>>) -> Self {
-		match wrapper.error {
+    fn from(wrapper: WrappedError<hiring::FillOpeningError<T>>) -> Self {
+        match wrapper.error {
 			hiring::FillOpeningError::<T>::OpeningDoesNotExist => MSG_FULL_CURATOR_OPENING_OPENING_DOES_NOT_EXIST,
 			hiring::FillOpeningError::<T>::OpeningNotInReviewPeriodStage => MSG_FULL_CURATOR_OPENING_OPENING_NOT_IN_REVIEW_PERIOD_STAGE,
 			hiring::FillOpeningError::<T>::UnstakingPeriodTooShort(
@@ -187,81 +186,81 @@ impl<T: hiring::Trait> rstd::convert::From<WrappedError<hiring::FillOpeningError
 			hiring::FillOpeningError::<T>::ApplicationNotInActiveStage(_application_id) => MSG_FULL_CURATOR_OPENING_APPLICATION_NOT_ACTIVE,
 			hiring::FillOpeningError::<T>::ApplicationForWrongOpening(_application_id) => MSG_FILL_CURATOR_OPENING_APPLICATION_FOR_WRONG_OPENING,
 		}
-	}
+    }
 }
 
 impl rstd::convert::From<WrappedError<hiring::DeactivateApplicationError>> for &str {
-	fn from(wrapper: WrappedError<hiring::DeactivateApplicationError>) -> Self {
-		match wrapper.error {
-			hiring::DeactivateApplicationError::ApplicationDoesNotExist => {
-				MSG_WITHDRAW_CURATOR_APPLICATION_APPLICATION_DOES_NOT_EXIST
-			}
-			hiring::DeactivateApplicationError::ApplicationNotActive => {
-				MSG_WITHDRAW_CURATOR_APPLICATION_APPLICATION_NOT_ACTIVE
-			}
-			hiring::DeactivateApplicationError::OpeningNotAcceptingApplications => {
-				MSG_WITHDRAW_CURATOR_APPLICATION_OPENING_NOT_ACCEPTING_APPLICATIONS
-			}
-			hiring::DeactivateApplicationError::UnstakingPeriodTooShort(_stake_purpose) => {
-				MSG_WITHDRAW_CURATOR_APPLICATION_UNSTAKING_PERIOD_TOO_SHORT
-			}
-			hiring::DeactivateApplicationError::RedundantUnstakingPeriodProvided(
-				_stake_purpose,
-			) => MSG_WITHDRAW_CURATOR_APPLICATION_REDUNDANT_UNSTAKING_PERIOD,
-		}
-	}
+    fn from(wrapper: WrappedError<hiring::DeactivateApplicationError>) -> Self {
+        match wrapper.error {
+            hiring::DeactivateApplicationError::ApplicationDoesNotExist => {
+                MSG_WITHDRAW_CURATOR_APPLICATION_APPLICATION_DOES_NOT_EXIST
+            }
+            hiring::DeactivateApplicationError::ApplicationNotActive => {
+                MSG_WITHDRAW_CURATOR_APPLICATION_APPLICATION_NOT_ACTIVE
+            }
+            hiring::DeactivateApplicationError::OpeningNotAcceptingApplications => {
+                MSG_WITHDRAW_CURATOR_APPLICATION_OPENING_NOT_ACCEPTING_APPLICATIONS
+            }
+            hiring::DeactivateApplicationError::UnstakingPeriodTooShort(_stake_purpose) => {
+                MSG_WITHDRAW_CURATOR_APPLICATION_UNSTAKING_PERIOD_TOO_SHORT
+            }
+            hiring::DeactivateApplicationError::RedundantUnstakingPeriodProvided(
+                _stake_purpose,
+            ) => MSG_WITHDRAW_CURATOR_APPLICATION_REDUNDANT_UNSTAKING_PERIOD,
+        }
+    }
 }
 
 impl rstd::convert::From<WrappedError<members::ControllerAccountForMemberCheckFailed>> for &str {
-	fn from(wrapper: WrappedError<members::ControllerAccountForMemberCheckFailed>) -> Self {
-		match wrapper.error {
-			members::ControllerAccountForMemberCheckFailed::NotMember => {
-				MSG_CREATE_CHANNEL_IS_NOT_MEMBER
-			}
-			members::ControllerAccountForMemberCheckFailed::NotControllerAccount => {
-				MSG_CREATE_CHANNEL_NOT_CONTROLLER_ACCOUNT
-			}
-		}
-	}
+    fn from(wrapper: WrappedError<members::ControllerAccountForMemberCheckFailed>) -> Self {
+        match wrapper.error {
+            members::ControllerAccountForMemberCheckFailed::NotMember => {
+                MSG_CREATE_CHANNEL_IS_NOT_MEMBER
+            }
+            members::ControllerAccountForMemberCheckFailed::NotControllerAccount => {
+                MSG_CREATE_CHANNEL_NOT_CONTROLLER_ACCOUNT
+            }
+        }
+    }
 }
 
 impl rstd::convert::From<WrappedError<hiring::AddApplicationError>> for &str {
-	fn from(wrapper: WrappedError<hiring::AddApplicationError>) -> Self {
-		match wrapper.error {
-			hiring::AddApplicationError::OpeningDoesNotExist => {
-				MSG_ADD_CURATOR_OPENING_OPENING_DOES_NOT_EXIST
-			}
-			hiring::AddApplicationError::StakeProvidedWhenRedundant(_stake_purpose) => {
-				MSG_ADD_CURATOR_OPENING_STAKE_PROVIDED_WHEN_REDUNDANT
-			}
-			hiring::AddApplicationError::StakeMissingWhenRequired(_stake_purpose) => {
-				MSG_ADD_CURATOR_OPENING_STAKE_MISSING_WHEN_REQUIRED
-			}
-			hiring::AddApplicationError::StakeAmountTooLow(_stake_purpose) => {
-				MSG_ADD_CURATOR_OPENING_STAKE_AMOUNT_TOO_LOW
-			}
-			hiring::AddApplicationError::OpeningNotInAcceptingApplicationsStage => {
-				MSG_ADD_CURATOR_OPENING_OPENING_NOT_IN_ACCEPTING_APPLICATION_STAGE
-			}
-			hiring::AddApplicationError::NewApplicationWasCrowdedOut => {
-				MSG_ADD_CURATOR_OPENING_NEW_APPLICATION_WAS_CROWDED_OUT
-			}
-		}
-	}
+    fn from(wrapper: WrappedError<hiring::AddApplicationError>) -> Self {
+        match wrapper.error {
+            hiring::AddApplicationError::OpeningDoesNotExist => {
+                MSG_ADD_CURATOR_OPENING_OPENING_DOES_NOT_EXIST
+            }
+            hiring::AddApplicationError::StakeProvidedWhenRedundant(_stake_purpose) => {
+                MSG_ADD_CURATOR_OPENING_STAKE_PROVIDED_WHEN_REDUNDANT
+            }
+            hiring::AddApplicationError::StakeMissingWhenRequired(_stake_purpose) => {
+                MSG_ADD_CURATOR_OPENING_STAKE_MISSING_WHEN_REQUIRED
+            }
+            hiring::AddApplicationError::StakeAmountTooLow(_stake_purpose) => {
+                MSG_ADD_CURATOR_OPENING_STAKE_AMOUNT_TOO_LOW
+            }
+            hiring::AddApplicationError::OpeningNotInAcceptingApplicationsStage => {
+                MSG_ADD_CURATOR_OPENING_OPENING_NOT_IN_ACCEPTING_APPLICATION_STAGE
+            }
+            hiring::AddApplicationError::NewApplicationWasCrowdedOut => {
+                MSG_ADD_CURATOR_OPENING_NEW_APPLICATION_WAS_CROWDED_OUT
+            }
+        }
+    }
 }
 
 impl rstd::convert::From<WrappedError<members::MemberControllerAccountDidNotSign>> for &str {
-	fn from(wrapper: WrappedError<members::MemberControllerAccountDidNotSign>) -> Self {
-		match wrapper.error {
-			members::MemberControllerAccountDidNotSign::UnsignedOrigin => {
-				MSG_APPLY_ON_CURATOR_OPENING_UNSIGNED_ORIGIN
-			}
-			members::MemberControllerAccountDidNotSign::MemberIdInvalid => {
-				MSG_APPLY_ON_CURATOR_OPENING_MEMBER_ID_INVALID
-			}
-			members::MemberControllerAccountDidNotSign::SignerControllerAccountMismatch => {
-				MSG_APPLY_ON_CURATOR_OPENING_SIGNER_NOT_CONTROLLER_ACCOUNT
-			}
-		}
-	}
-}
+    fn from(wrapper: WrappedError<members::MemberControllerAccountDidNotSign>) -> Self {
+        match wrapper.error {
+            members::MemberControllerAccountDidNotSign::UnsignedOrigin => {
+                MSG_APPLY_ON_CURATOR_OPENING_UNSIGNED_ORIGIN
+            }
+            members::MemberControllerAccountDidNotSign::MemberIdInvalid => {
+                MSG_APPLY_ON_CURATOR_OPENING_MEMBER_ID_INVALID
+            }
+            members::MemberControllerAccountDidNotSign::SignerControllerAccountMismatch => {
+                MSG_APPLY_ON_CURATOR_OPENING_SIGNER_NOT_CONTROLLER_ACCOUNT
+            }
+        }
+    }
+}