- 
                Notifications
    You must be signed in to change notification settings 
- Fork 30
Add Ledger signer provider #1946
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
base: feature/ledger_signer
Are you sure you want to change the base?
Conversation
abe8a88    to
    89285d1      
    Compare
  
    10d2120    to
    a8231af      
    Compare
  
    4c64407    to
    10bd693      
    Compare
  
    5b2cae2    to
    2de6ff8      
    Compare
  
    ab50373    to
    b304ef1      
    Compare
  
    d4a8f4d    to
    32a8870      
    Compare
  
    61292c5    to
    eeb6484      
    Compare
  
    5d3edf0    to
    d6fd484      
    Compare
  
    32a8870    to
    39d3e58      
    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.
I'd like to look at this code one more time later. But perhaps it's better to merge it to the parent PR first, to review all the changes together.
| row![rich_text([ | ||
| span("Firmware version: ").font(bold_font), | ||
| span(firmware_version.clone()) | ||
| ]) | ||
| .size(TEXT_SIZE),] | 
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.
IMO we should be able to obtain the device name for the ledger too (which will be the model name, not the label set in Ledger Live, but it's still better than nothing).
As I've mentioned in the ledger app PR, it seems like the APDU 0xE0/0x01 is "get device info" (need to check if it works when an app is opened though). One of the returned values is targetId, from which the model name can be deduced.
Ledger Live sometimes calls this endpoint - https://manager.api.live.ledger.com/api/devices - to get the device model name (by comparing obtained the device's targetId with target_id inside device_versions of the returned json.)
(I'm not suggesting to use their endpoint, but we might just take its current values and hardcode them).
And it also has a hardcoded array of device infos and this function obtains them by targetId - https://github.com/LedgerHQ/ledger-live/blob/2dddf3a308ec6bd9fa436c7bc5bc02bcb33593e6/libs/ledgerjs/packages/devices/src/index.ts#L176-L182
| use async_trait::async_trait; | ||
| use common::{ | 
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.
Plz put 3rd-party imports in a separate group
fbbfd75    to
    1ae1ecc      
    Compare
  
    39d3e58    to
    4c711b6      
    Compare
  
    
No description provided.