HomePhabricator

[Cashtab] Migrate validateMnemonic from useWallet to validation

Description

[Cashtab] Migrate validateMnemonic from useWallet to validation

Summary:
T2800

This diff:

  • moves the validateMnemonic function from useWallet to validation
  • adds corresponding unit tests to validate.test.js
  • updates references to validateMnemonic in the Onboarding and Configure components

Test Plan:

  • grep -r 'validateMnemonic' src/ and ensure no references to useWallet's ContextValue object
  • 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
  • open browser in incognito mode to trigger onboarding screen
  • create a new wallet and ensure successful creation
  • import the earlier 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/D12586

Details

Provenance
emackAuthored on Nov 22 2022, 22:49
emackPushed on Nov 23 2022, 09:09
Reviewer
Restricted Project
Differential Revision
D12586: [Cashtab] Migrate validateMnemonic from useWallet to validation
Parents
rABC92bc10eed0af: [Cashtab] Deprecate address validator artifact
Branches
Unknown
Tags
Unknown