HomePhabricator

[Cashtab] [BCH Deprecation] [Mnemonic] Pt 6/7 - Optimize bip39 bundle via…

Description

[Cashtab] [BCH Deprecation] [Mnemonic] Pt 6/7 - Optimize bip39 bundle via webpack IgnorePlugin

Summary:
T2730

Depends on D12482

Stacked diff to localize existing uses of BCH.Mnemonic throughout the app and deprecate the BCH.Mnemonic object.

This diff uses webpack.IgnorePlugin to create a bip39 bundle that would only contain the english wordlists.

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
  • insert a valid mnemonic into the Import Wallet field and ensure the english wordlist is displayed along with a 'bip39 wordlist is excluding japanese, spanish, italian, french, korean, czech, portuguese and chinese' console log message
  • comment out the webpack.IgnorePlugin config in webpack.config.js and observe that the console log message above for excluding non-english wordlists is not displayed

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D12526

Details

Provenance
emackAuthored on Nov 18 2022, 05:47
emackPushed on Nov 22 2022, 21:49
Reviewer
Restricted Project
Differential Revision
D12526: [Cashtab] [BCH Deprecation] [Mnemonic] Pt 6/7 - Optimize bip39 bundle via webpack IgnorePlugin
Parents
rABCa4d3a4175893: [Cashtab] [BCH Deprecation] [Mnemonic] Pt 5/7 - Deprecate BCH.Mnemonic
Branches
Unknown
Tags
Unknown