diff --git a/apple/Tests/TestCases/Profile/MFA/SecurityShieldsBuilderTests.swift b/apple/Tests/TestCases/Profile/MFA/SecurityShieldsBuilderTests.swift index d259f0097..7061ba22b 100644 --- a/apple/Tests/TestCases/Profile/MFA/SecurityShieldsBuilderTests.swift +++ b/apple/Tests/TestCases/Profile/MFA/SecurityShieldsBuilderTests.swift @@ -104,6 +104,9 @@ struct ShieldTests { #expect(builder.validate() == .ConfirmationRoleMustHaveAtLeastOneFactor) builder.addFactorSourceToConfirmationOverride(factorSourceId: .sampleArculus) + + builder.setAuthenticationSigningFactor(new: .sampleDevice) + #expect(builder.validate() == nil) #expect((try? builder.build()) != nil) } @@ -173,6 +176,8 @@ struct ShieldTests { builder.addFactorSourceToRecoveryOverride(factorSourceId: .sampleArculus) builder.addFactorSourceToConfirmationOverride(factorSourceId: .sampleArculusOther) + builder.setAuthenticationSigningFactor(new: .sampleDevice) + let shield = try! builder.build() #expect(shield.matrixOfFactors.primaryRole.overrideFactors.isEmpty) @@ -205,6 +210,8 @@ struct ShieldTests { builder.removeFactorFromPrimary(factorSourceId: .sampleArculusOther) builder.removeFactorFromRecovery(factorSourceId: .sampleLedgerOther) + builder.setAuthenticationSigningFactor(new: .sampleDevice) + // Validate #expect(builder.validate() == nil) diff --git a/crates/sargon/src/factor_instances_provider/provider/factor_instances_provider.rs b/crates/sargon/src/factor_instances_provider/provider/factor_instances_provider.rs index 7665c5b02..511041830 100644 --- a/crates/sargon/src/factor_instances_provider/provider/factor_instances_provider.rs +++ b/crates/sargon/src/factor_instances_provider/provider/factor_instances_provider.rs @@ -417,7 +417,6 @@ impl FactorInstancesProvider { Ok((derivation_preset, per_factor_paths)) }) .collect::>, IndexMap< DerivationPreset, IndexMap>, diff --git a/crates/sargon/src/profile/mfa/security_structures/matrices/matrix_of_factor_instances.rs b/crates/sargon/src/profile/mfa/security_structures/matrices/matrix_of_factor_instances.rs index 9ac9a091d..dffcb1745 100644 --- a/crates/sargon/src/profile/mfa/security_structures/matrices/matrix_of_factor_instances.rs +++ b/crates/sargon/src/profile/mfa/security_structures/matrices/matrix_of_factor_instances.rs @@ -239,7 +239,6 @@ impl SecurityStructureOfFactorInstances { let _ = existing.shift_remove(&instance); // don't forget to consume it! Ok(instance) } else { - println!("👨‍🔬 SSFI ❌ get_mut failed => MissingRolaKeyForSecurityStructureOfFactorInstances ❌"); Err(CommonError::MissingRolaKeyForSecurityStructureOfFactorInstances) }?;