From 00ed82b7f618d87fedf24d86b6798ad3dd45ebce Mon Sep 17 00:00:00 2001 From: Francisco Gindre Date: Thu, 16 Dec 2021 17:20:56 -0300 Subject: [PATCH] Move creational factory methods together to the same extension --- secant/Features/BackupFlow/RecoveryPhraseValidation.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/secant/Features/BackupFlow/RecoveryPhraseValidation.swift b/secant/Features/BackupFlow/RecoveryPhraseValidation.swift index 0f8795b..d31dcb0 100644 --- a/secant/Features/BackupFlow/RecoveryPhraseValidation.swift +++ b/secant/Features/BackupFlow/RecoveryPhraseValidation.swift @@ -23,7 +23,6 @@ struct RecoveryPhraseValidationState: Equatable { case complete(phrase: RecoveryPhrase, missingIndices: [Int], completion: [RecoveryPhraseStepCompletion], missingWordsChips: [PhraseChip.Kind]) case valid(phrase: RecoveryPhrase, missingIndices: [Int], completion: [RecoveryPhraseStepCompletion], missingWordsChips: [PhraseChip.Kind]) case invalid(phrase: RecoveryPhrase, missingIndices: [Int], completion: [RecoveryPhraseStepCompletion], missingWordsChips: [PhraseChip.Kind]) - } static let wordGroupSize = 6 @@ -57,7 +56,7 @@ extension RecoveryPhraseValidationState { phrase: RecoveryPhrase, missingIndices: [Int], missingWordsChips: [PhraseChip.Kind] - ) -> RecoveryPhraseValidationState { + ) -> Self { RecoveryPhraseValidationState( phrase: phrase, missingIndices: missingIndices, @@ -65,9 +64,7 @@ extension RecoveryPhraseValidationState { completion: [] ) } -} -extension RecoveryPhraseValidationState { /// creates an initial `RecoveryPhraseValidationState` with no completions and random missing indices. /// - Note: Use this function to create a random validation puzzle for a given phrase. static func random(phrase: RecoveryPhrase) -> Self {