-
Notifications
You must be signed in to change notification settings - Fork 315
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
LIVE-2641 Prevent emitting an event when device descriptor is null #1070
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: e9f0cc6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Screenshots: ✅
There are no changes in the screenshots for this PR. If this is expected, you are good to go. |
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.
lint issues (according to CI)
Codecov Report
@@ Coverage Diff @@
## develop #1070 +/- ##
===========================================
- Coverage 47.57% 0 -47.58%
===========================================
Files 647 0 -647
Lines 28899 0 -28899
Branches 7456 0 -7456
===========================================
- Hits 13750 0 -13750
+ Misses 15091 0 -15091
+ Partials 58 0 -58
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
📝 Description
This is a fix for an error that was found in Sentry.
While scanning devices, if there was a device for which the scan failed, we emitted is as a
null
device. However this broke on React end since we were trying to access infos from this null value as if it were an object.See associated JIRA task for more info on the error.
The PR prevents the emission of an event in this case, fixing the issue directly in the scanning logic. This could have been prevented if we had a stricter typing, so I've also added some typing to the logic.
❓ Context
ledgerjs/react-native-hw-transport-ble
,ledger-live-mobile
✅ Checklist
📸 Demo
N/A