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: clarify error message for invalid address selected #5833

Merged
merged 3 commits into from
Feb 8, 2024

Conversation

lpaquet-ledger
Copy link
Contributor

📝 Description

clarify error message for invalid address selected
Add two different messages if the error happens at two different steps

❓ Context

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

✅ Checklist

Pull Requests must pass the CI and be code reviewed. Set as Draft if the PR is not ready.

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


🧐 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)

@lpaquet-ledger lpaquet-ledger requested review from a team as code owners January 3, 2024 15:09
Copy link

vercel bot commented Jan 3, 2024

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

Name Status Preview Comments Updated (UTC)
web-tools ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 6, 2024 1:42pm
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Feb 6, 2024 1:42pm
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Feb 6, 2024 1:42pm
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Feb 6, 2024 1:42pm
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Feb 6, 2024 1:42pm

@live-github-bot live-github-bot bot added common Has changes in live-common ledgerjs Has changes in the ledgerjs open source libs labels Jan 3, 2024
Comment on lines 32 to 36
case ErrorStatus.INVALID_ADDRESS:
return "Invalid address";
case ErrorStatus.USER_REFUSED:
return "User refused";
if (step === "CHECK_PAYOUT_ADDRESS")
return "This receiving account does not belong to your device. Please change and retry."
else if (step === "CHECK_REFUND_ADDRESS")
return "This receiving account does not belong to your device for the refund. Please change and retry.";
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't you fallback to the previous error? And this step checks was on INVALID_ADDRESS, not USER_REFUSED iirc?

kallen-ledger
kallen-ledger previously approved these changes Jan 8, 2024
CremaFR
CremaFR previously approved these changes Feb 2, 2024
kallen-ledger
kallen-ledger previously approved these changes Feb 2, 2024
@lpaquet-ledger lpaquet-ledger force-pushed the feat/LIVE-9693-invalid-address-error branch from 9d655b2 to 00cbb14 Compare February 5, 2024 08:48
@lpaquet-ledger lpaquet-ledger requested a review from a team as a code owner February 5, 2024 09:39
@live-github-bot live-github-bot bot added desktop Has changes in LLD mobile Has changes in LLM labels Feb 5, 2024
@lpaquet-ledger lpaquet-ledger force-pushed the feat/LIVE-9693-invalid-address-error branch from 7719d49 to cadd9d7 Compare February 5, 2024 13:04
@live-github-bot live-github-bot bot removed desktop Has changes in LLD mobile Has changes in LLM labels Feb 5, 2024
Copy link
Member

@CremaFR CremaFR left a comment

Choose a reason for hiding this comment

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

👍

@lpaquet-ledger lpaquet-ledger merged commit 34095f3 into develop Feb 8, 2024
61 checks passed
@lpaquet-ledger lpaquet-ledger deleted the feat/LIVE-9693-invalid-address-error branch February 8, 2024 08:26
jdabbech-ledger pushed a commit that referenced this pull request Feb 19, 2024
…-error

feat: clarify error message for invalid address selected
jdabbech-ledger pushed a commit that referenced this pull request Feb 19, 2024
…-error

feat: clarify error message for invalid address selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Has changes in live-common ledgerjs Has changes in the ledgerjs open source libs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants