Page MenuHomePhabricator

[Cashtab] [BCH Deprecation] [Mnemonic] Pt 3/7 - Implement BCH.Mnemonic.wordLists locally
ClosedPublic

Authored by emack on Nov 10 2022, 07:28.

Details

Summary

T2730

Depends on D12451

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

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 throughout the app
Pt 6/7 - Optimize bip39 bundle via webpack IgnorePlugin
Pt 7/7 - Unwrap validateMnemonicWordList

Test Plan

npm test
npm start
create a new wallet and observe the 'bip39 wordlists matches BCH.Mnemonic wordlists' console log message
import a wallet and observe the same console log message

Diff Detail

Event Timeline

emack requested review of this revision.Nov 10 2022, 07:28

Green with a nit -- we should implement bip39 with only the english word list. See discussion in README at https://www.npmjs.com/package/bip39

The webpack approach is probably the best for Cashtab. Please add a part 6 to this stack to do this.

This revision is now accepted and ready to land.Nov 10 2022, 10:03
emack retitled this revision from [Cashtab] [BCH Deprecation] [Mnemonic] Pt 3/5 - Implement BCH.Mnemonic.wordLists locally to [Cashtab] [BCH Deprecation] [Mnemonic] Pt 3/6 - Implement BCH.Mnemonic.wordLists locally.Nov 10 2022, 12:59
emack edited the summary of this revision. (Show Details)
emack retitled this revision from [Cashtab] [BCH Deprecation] [Mnemonic] Pt 3/6 - Implement BCH.Mnemonic.wordLists locally to [Cashtab] [BCH Deprecation] [Mnemonic] Pt 3/7 - Implement BCH.Mnemonic.wordLists locally.Nov 14 2022, 12:06
emack edited the summary of this revision. (Show Details)