CP-10109 Wallets management #2841
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Ticket: CP-10109
This PR introduces functionality to import existing wallets (via seed and private keys) and provides UI for managing multiple wallets and their associated accounts.
Key changes:
Wallet Import:
Implemented the flow for importing wallets using a seed phrase.
Added an
ImportPrivateKey
screen and the corresponding logic to import accounts via their private keys.Multi-Wallet and Account Management UI:
Introduced an
addOrConnectWallet
screen, providing a central point for users to either create a new wallet or import an existing one.Updated the "Manage Accounts" screen to display a list of available wallets and their respective accounts.
State Management & Core Logic:
Created a thunk for
setActiveAccount
to ensure that when an account is made active, its parent wallet context is also correctly set.Ensured that the real
walletId
is used when creating subsequent accounts within a wallet.Removed the
isActive
property from the Wallet interface, as active status is managed via dedicated Redux state.Refactoring & Fixes:
Corrected ThunkDispatch typing.
Screenshots/Videos
Import seed flow
Import PK flow
Testing
Import Seed Wallet:
Import Private Key:
Multi-Wallet/Account Navigation:
Error Handling:
Known issues
Checklist
Please check all that apply (if applicable)