Fix randomIndices()

This commit is contained in:
Francisco Gindre 2021-12-21 10:22:44 -03:00
parent cde059b9e7
commit cdcce122fa
1 changed files with 5 additions and 1 deletions

View File

@ -164,7 +164,11 @@ extension RecoveryPhraseValidationState {
}
static func randomIndices() -> [Int] {
Array(repeating: Int.random(in: 0...wordGroupSize - 1), count: phraseChunks)
var indices = [Int]()
for _ in (0 ..< phraseChunks) {
indices.append(Int.random(in: 0 ..< wordGroupSize))
}
return indices
}
}