[Cashtab] [BCH Deprecation] [Mnemonic] Pt 7/7 - Unwrap validateMnemonicWordList
Summary:
T2730
Depends on D12526
Stacked diff to localize existing uses of BCH.Mnemonic throughout the app and deprecate the BCH.Mnemonic object.
This diff unwraps the validateMnemonicWordList function which brings the mnemonicToEntropy function in bip39 into Cashtab and ensures it returns true/false as the validation outcome rather than the custom strings that require further parsing.
Pt 1/7 - Implement BCH.Mnemonic.toSeed locally
Pt 2/7 - Implement BCH.Mnemonic.generate locally
Pt 3/7 - Implement BCH.Mnemonic.wordLists locally
Pt 4/7 - Implement BCH.Mnemonic.validate locally
Pt 5/7 - Deprecate BCH.Mnemonic
Pt 6/7 - Optimize bip39 bundle via webpack IgnorePlugin
Pt 7/7 - Unwrap validateMnemonicWordList
Test Plan:
- npm test
- npm start
- create a new wallet, note the mnemonic, delete wallet
- import the wallet via mnemonic
- ensure successful send and receive of XEC to this imported wallet
Reviewers: bytesofman, #bitcoin_abc
Reviewed By: bytesofman, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D12530