diff options
author | Ian Coleman <coleman.ian@gmail.com> | 2014-09-27 21:51:06 +1000 |
---|---|---|
committer | Ian Coleman <coleman.ian@gmail.com> | 2014-09-27 21:51:06 +1000 |
commit | 783981debeec37c05173af31588ca5fbc286188c (patch) | |
tree | 92b171b787b80b0d4dfe44a475615d092d92dc78 | |
parent | be6ba9a836bebfb245c0d139436e728296485e5e (diff) | |
download | BIP39-783981debeec37c05173af31588ca5fbc286188c.tar.gz BIP39-783981debeec37c05173af31588ca5fbc286188c.tar.zst BIP39-783981debeec37c05173af31588ca5fbc286188c.zip |
Phrase is normalized before checking for errors
-rw-r--r-- | bip39-standalone.html | 1 | ||||
-rw-r--r-- | src/js/index.js | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/bip39-standalone.html b/bip39-standalone.html index b062b2e..6125ce3 100644 --- a/bip39-standalone.html +++ b/bip39-standalone.html | |||
@@ -22900,6 +22900,7 @@ WORDLISTS = { | |||
22900 | function findPhraseErrors(phrase) { | 22900 | function findPhraseErrors(phrase) { |
22901 | // TODO make this right | 22901 | // TODO make this right |
22902 | // Preprocess the words | 22902 | // Preprocess the words |
22903 | phrase = mnemonic.normalizeString(phrase); | ||
22903 | var parts = phrase.split(" "); | 22904 | var parts = phrase.split(" "); |
22904 | var proper = []; | 22905 | var proper = []; |
22905 | for (var i=0; i<parts.length; i++) { | 22906 | for (var i=0; i<parts.length; i++) { |
diff --git a/src/js/index.js b/src/js/index.js index d6f752d..5b8aedb 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -199,6 +199,7 @@ | |||
199 | function findPhraseErrors(phrase) { | 199 | function findPhraseErrors(phrase) { |
200 | // TODO make this right | 200 | // TODO make this right |
201 | // Preprocess the words | 201 | // Preprocess the words |
202 | phrase = mnemonic.normalizeString(phrase); | ||
202 | var parts = phrase.split(" "); | 203 | var parts = phrase.split(" "); |
203 | var proper = []; | 204 | var proper = []; |
204 | for (var i=0; i<parts.length; i++) { | 205 | for (var i=0; i<parts.length; i++) { |