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

add --nfc flag to use NFC apdu media #519

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yrichard-ledger
Copy link

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 24.19355% with 47 lines in your changes missing coverage. Please review.

Project coverage is 44.81%. Comparing base (d04cdf2) to head (5cbdab5).

Files with missing lines Patch % Lines
speculos/mcu/nfc.py 26.66% 33 Missing ⚠️
speculos/mcu/seproxyhal.py 18.75% 13 Missing ⚠️
speculos/main.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #519      +/-   ##
==========================================
- Coverage   44.91%   44.81%   -0.10%     
==========================================
  Files         120      121       +1     
  Lines       12067    12127      +60     
  Branches      966      966              
==========================================
+ Hits         5420     5435      +15     
- Misses       6312     6357      +45     
  Partials      335      335              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -270,7 +275,10 @@ def __init__(self,
self.socket_helper.wait_until_tick_is_processed)
self.time_ticker_thread.start()

self.usb = usb.USB(self.socket_helper.queue_packet, transport=transport)
usb_transport = transport if transport in ['hid', 'u2f'] else 'hid'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
usb_transport = transport if transport in ['hid', 'u2f'] else 'hid'
usb_transport = transport if transport.lower() in ['hid', 'u2f'] else 'hid'

Copy link
Contributor

Choose a reason for hiding this comment

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

Arguably weird to check that here, when USB.__init__ already has equivalent check. Might as well replace the raise ValueError by a self.transport = Hid(self.send_xfer) there if fallbacking on HID is the expected behavior.

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