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

fix: add account v2 redirection from receive when no account found / add account v1 is OK #8999

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

themooneer
Copy link
Contributor

@themooneer themooneer commented Jan 24, 2025

✅ Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • ...

📝 Description

Issue analysis:

After reviewing the scenario in detail, it appears the account selection screen displayed in this particular use case is the "add account v1" version (designed for receiving), even the screen preceding the scan is the "add account v1" (intended for receiving). Therefore, when you select an account from the list, it will be added.

Essentially, on the production environment, this isn't a bug, because it's a logical sequence:

I initiate a "receive" operation.

I select an asset for which I don't have an existing account.

The scan that launches is the "add account v1" version.

The displayed list is the "add account v1" list for receiving (since it's a single selection).

Normally, if the "add account v2" feature flag is activated, we should go through (in this specific case) the "add account v2" device scan -> then a success or warning screen -> when we choose an account -> redirection to the address/QR code page. This case should be part of the receive plugin, however, I only handled the case where the "add account" button is on the account selection screen in cases of accounts already existing on the receive.

Solution:

When the user try to receive funds on currency where there is no persisted account, the redirection should be done to Add account v2 flow (FF ON) and on the success/warning page when an account is selected , the redirection should be to the receive confirmation page with QR code.

Full scenario here ⬇️

Screen.Recording.2025-01-24.at.15.38.26.mov

I also made a refactor for the use of string literal "addAccounts" or "receiveFunds" across the codebase and replaced it with common enum based type.

Please make sure your review covers the scope of the changes.

❓ Context

  • JIRA or GitHub link:

https://ledgerhq.atlassian.net/browse/LIVE-16522

🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

@themooneer themooneer requested review from a team as code owners January 24, 2025 15:00
Copy link

vercel bot commented Jan 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Jan 24, 2025 3:06pm
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Jan 24, 2025 3:06pm
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Jan 24, 2025 3:06pm
web-tools ⬜️ Ignored (Inspect) Visit Preview Jan 24, 2025 3:06pm

@live-github-bot live-github-bot bot added the mobile Has changes in LLM label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Has changes in LLM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants