We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3788524 commit b515690Copy full SHA for b515690
Sources/Web3Core/KeystoreManager/BIP39.swift
@@ -152,7 +152,7 @@ public class BIP39 {
152
}
153
154
public static func mnemonicsToEntropy(_ mnemonics: [String], language: BIP39Language = .english) -> Data? {
155
- guard mnemonics.count >= 12 && mnemonics.count.isMultiple(of: 3) && mnemonics.count <= 24 else { return nil }
+ guard 12...24 ~= mnemonics.count && mnemonics.count.isMultiple(of: 3) else { return nil }
156
var bitString = ""
157
for word in mnemonics {
158
guard let idx = language.words.firstIndex(of: word) else {
0 commit comments