-
Notifications
You must be signed in to change notification settings - Fork 333
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
Ledger Sync - Display error when scanning invalid QR Code #7800
Ledger Sync - Display error when scanning invalid QR Code #7800
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ
4 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add it also in apps/ledger-live-mobile/src/newArch/features/Accounts/screens/AddAccount/components/StepFlow.tsx
if (data.match(/host=([0-9A-Fa-f]+)/)) { | ||
this.setState({ | ||
error: new ScannedNewImportQrCode(), | ||
progress: 0, | ||
}); | ||
screen("", AnalyticsPage.ScannedIncompatibleApps, { source: "Account Import Sync" }); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have to do it in the catch block? Couldn't we perform the check at the beginning instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the analytics event for the error that is triggered in the catch (the setState({ error: new ScannedNewImportQrCode() })
).
As it's handled by the generic error component I had to trigger the analytics here
eef5c0b
to
9171311
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StepFlow.tsx
needs to be updated also
9171311
to
1c53f10
Compare
β Checklist
npx changeset
was attached.π Description
Replace this text by a clear and concise description of what this pull request is about and why it is needed. Be sure to explain the problem you're addressing and the solution you're proposing.
For libraries, you can add a code sample of how to use it.
For bugfixes, you can explain the previous behavior and how it was fixed.
In case of visual features, please attach screenshots or video recordings to demonstrate the changes.
β Context
π§ Checklist for the PR Reviewers