mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-05-29 20:14:44 +00:00
Phrase is normalized before checking for errors
This commit is contained in:
@@ -22900,6 +22900,7 @@ WORDLISTS = {
|
|||||||
function findPhraseErrors(phrase) {
|
function findPhraseErrors(phrase) {
|
||||||
// TODO make this right
|
// TODO make this right
|
||||||
// Preprocess the words
|
// Preprocess the words
|
||||||
|
phrase = mnemonic.normalizeString(phrase);
|
||||||
var parts = phrase.split(" ");
|
var parts = phrase.split(" ");
|
||||||
var proper = [];
|
var proper = [];
|
||||||
for (var i=0; i<parts.length; i++) {
|
for (var i=0; i<parts.length; i++) {
|
||||||
|
|||||||
@@ -199,6 +199,7 @@
|
|||||||
function findPhraseErrors(phrase) {
|
function findPhraseErrors(phrase) {
|
||||||
// TODO make this right
|
// TODO make this right
|
||||||
// Preprocess the words
|
// Preprocess the words
|
||||||
|
phrase = mnemonic.normalizeString(phrase);
|
||||||
var parts = phrase.split(" ");
|
var parts = phrase.split(" ");
|
||||||
var proper = [];
|
var proper = [];
|
||||||
for (var i=0; i<parts.length; i++) {
|
for (var i=0; i<parts.length; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user