Skip to content

Commit 4da0e62

Browse files
committed
more cleanup
1 parent 90d42ee commit 4da0e62

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

pallets/msa/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,11 +1707,11 @@ impl<T: Config> SchemaGrantValidator<BlockNumberFor<T>> for Pallet<T> {
17071707

17081708
impl<T: Config> MsaKeyProvider for Pallet<T> {
17091709
type AccountId = T::AccountId;
1710-
// Returns true if ALL of the following are true:
1711-
// - Msa exists
1712-
// - Current block is < FreeKeyAddExpirationBlock
1710+
// Returns true if ALL of the following are true:
1711+
// - Msa exists
1712+
// - FreeKeyAddExpirationBlock is after current block
17131713
// - The stored msa_id for the key == `msa_id`
1714-
// - It has only one key associated with it
1714+
// - It has only one key associated with it
17151715
fn key_eligible_for_free_addition(old_key: Self::AccountId, msa_id: MessageSourceId) -> bool {
17161716
if let Some(stored_msa_id) = Self::get_msa_id(&old_key) {
17171717
let block = frame_system::Pallet::<T>::block_number();
@@ -1869,7 +1869,7 @@ impl<T: Config + Send + Sync> CheckFreeExtrinsicUse<T> {
18691869
)
18701870
.any(|provider_id| {
18711871
Pallet::<T>::ensure_valid_delegation(provider_id, delegator_id, None).is_ok()
1872-
});type FreeKeyAddExpirationOrigin
1872+
});
18731873

18741874
ensure!(
18751875
!has_active_delegations,

runtime/frequency/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,7 @@ impl GetAddKeyData<RuntimeCall, AccountId, MessageSourceId> for MsaCallFilter {
343343
fn get_add_key_data(call: &RuntimeCall) -> Option<(AccountId, MessageSourceId)> {
344344
match call {
345345
#[cfg(feature = "runtime-benchmarks")]
346-
RuntimeCall::System(frame_system::Call::remark { .. }) => {
347-
let account_id: AccountId = AccountId::from([2; 32]);
348-
let msa_id: MessageSourceId = 2u32.into();
349-
Some((account_id, msa_id))
350-
},
346+
RuntimeCall::System(frame_system::Call::remark { .. }) => None,
351347

352348
RuntimeCall::Msa(MsaCall::add_public_key_to_msa {
353349
add_key_payload,

0 commit comments

Comments
 (0)