Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: CP-9472 add duplicated account dialog #90

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

vvava
Copy link
Contributor

@vvava vvava commented Nov 14, 2024

Description

We want to notify the user when a private key is being imported and that is already exist as a primary wallet.
Also we want to notify the users in a sooner step when they want to add a ledger wallet which is already lives in the extension.

Changes

New dialog to notify the users about duplicated account.
Modified import ledger handler so it can be used as a monitoring function to get the wallet is exist.
Modified UI flow to notify the users the ledger wallet already exists before we moved them forward to the naming phase.

Testing

Go to the Accounts page -> try to add the existing mnemonic wallet by importing the private key
and check you cannot add the same ledger (with BIP44 and Ledger Live) multiple times.

Screenshots:

image

Screen.Recording.2024-11-14.at.18.39.25.mov

Checklist for the author

Tick each of them when done or if not applicable.

  • I've covered new/modified business logic with Jest test cases.
  • I've tested the changes myself before sending it to code review and QA.

src/background/services/wallet/handlers/importLedger.ts Outdated Show resolved Hide resolved
src/background/services/wallet/handlers/models.ts Outdated Show resolved Hide resolved
src/pages/ImportPrivateKey/ImportPrivateKey.tsx Outdated Show resolved Hide resolved
src/components/ledger/LedgerConnector.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@bferenc bferenc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great! 👍
Can we standardize the names though? Currently there are multiple cases like "checkWalletExists", "isLedgerExists", "checkLedgerWalletIsExist"

@bferenc bferenc mentioned this pull request Nov 25, 2024
2 tasks
Copy link
Contributor

@bferenc bferenc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested as well ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants