Skip to content

Commit

Permalink
Merge pull request #118 from SiaFoundation/seed-regex
Browse files Browse the repository at this point in the history
only require 3 characters in wallet seed words
  • Loading branch information
lukechampine authored May 18, 2022
2 parents 56bab3a + 591f56c commit 5dd15cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ func StringToSeed(str string, did mnemonics.DictionaryID) (Seed, error) {
}

// Check for other formatting errors (English only)
IsFormat := regexp.MustCompile(`^([a-z]{4,12}){1}( {1}[a-z]{4,12}){27,28}$`).MatchString
IsFormat := regexp.MustCompile(`^([a-z]{3,12}){1}( {1}[a-z]{3,12}){27,28}$`).MatchString
if !IsFormat(str) {
return Seed{}, errors.New("seed is not valid: invalid formatting")
}
Expand Down

0 comments on commit 5dd15cf

Please sign in to comment.