Requested changes
All PR comments have been fixed in this commit
This commit is contained in:
parent
e618cc48e5
commit
598eac0eed
|
@ -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()
|
||||||
|
|
|
@ -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
|
||||||
|
@ -249,8 +248,7 @@ 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)
|
||||||
|
|
Loading…
Reference in New Issue