Skip to content

Commit ced8e15

Browse files
Fix order of calls in identity pallet. (#1201) (#1202)
Co-authored-by: Robert Gabriel Jakabosky <[email protected]>
2 parents 6b2ef48 + a07a30c commit ced8e15

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

pallets/identity/src/lib.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -318,25 +318,6 @@ decl_module! {
318318
Self::accept_primary_key_rotation(origin, rotation_auth_id, optional_cdd_auth_id)
319319
}
320320

321-
/// Call this with the new primary key. By invoking this method, caller accepts authorization
322-
/// to become the new primary key of the issuing identity. If a CDD service provider approved
323-
/// this change, (or this is not required), primary key of the DID is updated.
324-
///
325-
/// The caller (new primary key) must be either a secondary key of the issuing identity, or
326-
/// unlinked to any identity.
327-
///
328-
/// Differs from accept_primary_key in that it will leave the old primary key as a secondary
329-
/// key with the permissions specified in the corresponding RotatePrimaryKeyToSecondary authorization
330-
/// instead of unlinking the old primary key.
331-
///
332-
/// # Arguments
333-
/// * `owner_auth_id` Authorization from the owner who initiated the change
334-
/// * `cdd_auth_id` Authorization from a CDD service provider
335-
#[weight = <T as Config>::WeightInfo::rotate_primary_key_to_secondary()]
336-
pub fn rotate_primary_key_to_secondary(origin, auth_id:u64, optional_cdd_auth_id: Option<u64>) -> DispatchResult {
337-
Self::base_rotate_primary_key_to_secondary(origin, auth_id, optional_cdd_auth_id)
338-
}
339-
340321
/// Set if CDD authorization is required for updating primary key of an identity.
341322
/// Callable via root (governance)
342323
///
@@ -533,6 +514,25 @@ decl_module! {
533514
let issuer = Self::ensure_perms(origin)?;
534515
Self::base_revoke_claim(target, claim_type, issuer, scope)
535516
}
517+
518+
/// Call this with the new primary key. By invoking this method, caller accepts authorization
519+
/// to become the new primary key of the issuing identity. If a CDD service provider approved
520+
/// this change, (or this is not required), primary key of the DID is updated.
521+
///
522+
/// The caller (new primary key) must be either a secondary key of the issuing identity, or
523+
/// unlinked to any identity.
524+
///
525+
/// Differs from accept_primary_key in that it will leave the old primary key as a secondary
526+
/// key with the permissions specified in the corresponding RotatePrimaryKeyToSecondary authorization
527+
/// instead of unlinking the old primary key.
528+
///
529+
/// # Arguments
530+
/// * `owner_auth_id` Authorization from the owner who initiated the change
531+
/// * `cdd_auth_id` Authorization from a CDD service provider
532+
#[weight = <T as Config>::WeightInfo::rotate_primary_key_to_secondary()]
533+
pub fn rotate_primary_key_to_secondary(origin, auth_id:u64, optional_cdd_auth_id: Option<u64>) -> DispatchResult {
534+
Self::base_rotate_primary_key_to_secondary(origin, auth_id, optional_cdd_auth_id)
535+
}
536536
}
537537
}
538538

0 commit comments

Comments
 (0)