]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commit - src/js/index.js
Allow converting mnemonic back to raw entropy value
authorKevin Cernekee <cernekee@gmail.com>
Sun, 28 Oct 2018 20:20:33 +0000 (13:20 -0700)
committerKevin Cernekee <cernekee@gmail.com>
Sun, 28 Oct 2018 22:10:51 +0000 (15:10 -0700)
commit611f76238dedd0418c79a0d918d46d2c92b0149c
tree93ca072521fb19c304fe85764cfcb26387f918bd
parent011533e4bc1d49a6675dedf5bfaabefb7de41088
Allow converting mnemonic back to raw entropy value

Currently, this sequence produces an unexpected result:

1) Navigate to bip39-standalone.html

2) Paste a known-good mnemonic into the BIP39 Mnemonic field

3) Select "Show entropy details"

This will erase the BIP39 Mnemonic field and most of the derived
address/key information.  It shows an empty Entropy field, and zeroes
for Event Count, Bits Per Event, Raw Entropy Words, Total Bits, etc.
However, it will show valid Word Indexes and BIP39 Seed.

The way to fix it is to convert the mnemonic back into a raw entropy
value and populate it in DOM.entropy, so that everything stays
consistent.  This will only happen if the mnemonic is manually entered
by the user, not if phraseChanged() is triggered by hand-editing the
entropy value.
src/js/index.js
src/js/jsbip39.js