|
@@ -277,6 +277,9 @@ decl_error! {
|
|
|
/// Staking account for membership doesn't exist.
|
|
|
StakingAccountDoesntExist,
|
|
|
|
|
|
+ /// Staking account has already been confirmed.
|
|
|
+ StakingAccountAlreadyConfirmed,
|
|
|
+
|
|
|
/// Cannot add more staking account id.
|
|
|
MaximumStakingAccountNumberExceeded,
|
|
|
}
|
|
@@ -813,6 +816,11 @@ decl_module! {
|
|
|
Error::<T>::StakingAccountDoesntExist
|
|
|
);
|
|
|
|
|
|
+ ensure!(
|
|
|
+ !membership.staking_account_confirmed(&staking_account_id),
|
|
|
+ Error::<T>::StakingAccountAlreadyConfirmed
|
|
|
+ );
|
|
|
+
|
|
|
//
|
|
|
// == MUTATION SAFE ==
|
|
|
//
|