Requested changes

All PR comments have been fixed in this commit
This commit is contained in:
Lukas Korba 2022-02-24 14:14:50 +01:00
parent e618cc48e5
commit 598eac0eed
2 changed files with 5 additions and 7 deletions

View File

@ -159,7 +159,7 @@ extension RecoveryPhraseValidationReducer {
let value: RecoveryPhraseValidationAction = state.isValid ? .succeed : .fail let value: RecoveryPhraseValidationAction = state.isValid ? .succeed : .fail
return .concatenate( return .concatenate(
.init(value: .failureFeedback), Effect(value: .failureFeedback),
Effect(value: value) Effect(value: value)
.delay(for: 1, scheduler: environment.mainQueue) .delay(for: 1, scheduler: environment.mainQueue)
.eraseToEffect() .eraseToEffect()

View File

@ -116,8 +116,7 @@ extension RecoveryPhraseValidationState {
func wordsChips( func wordsChips(
for groupIndex: Int, for groupIndex: Int,
groupSize: Int, groupSize: Int,
from wordGroup: RecoveryPhrase.Group, from wordGroup: RecoveryPhrase.Group
state: RecoveryPhraseValidationState
) -> [PhraseChip.Kind] { ) -> [PhraseChip.Kind] {
let validationWord = validationWords.first(where: { $0.groupIndex == groupIndex }) let validationWord = validationWords.first(where: { $0.groupIndex == groupIndex })
@ -127,7 +126,7 @@ extension RecoveryPhraseValidationState {
} }
if let completedWord = validationWord?.word { if let completedWord = validationWord?.word {
return .unassigned(word: completedWord, color: state.coloredChipColor) return .unassigned(word: completedWord, color: self.coloredChipColor)
} }
return .empty return .empty
@ -248,9 +247,8 @@ private extension WordChipGrid {
) { ) {
let chips = state.wordsChips( let chips = state.wordsChips(
for: groupIndex, for: groupIndex,
groupSize: RecoveryPhraseValidationState.wordGroupSize, groupSize: RecoveryPhraseValidationState.wordGroupSize,
from: wordGroup, from: wordGroup
state: state
) )
self.init(chips: chips, coloredChipColor: state.coloredChipColor) self.init(chips: chips, coloredChipColor: state.coloredChipColor)