[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