cryptoadvance / specter-diy

DIY airgapped hardware wallet that uses QR codes for communication with the host
MIT License
440 stars 73 forks source link

Incorrect response when adding wallet over USB connection #254

Closed jp1ac4 closed 6 months ago

jp1ac4 commented 1 year ago

Hello, I encountered this issue while debugging an issue in the Liana wallet (see https://github.com/wizardsardine/liana/issues/532 and https://github.com/wizardsardine/async-hwi/issues/34).

When adding a wallet to Specter DIY connected over USB, the response received from the Specter device in both Confirm and Cancel cases is "error: User cancelled", although in the Confirm case the Liana wallet is indeed added successfully to the Specter device.

We would like to use the response received from the Specter device to determine whether adding the Liana wallet succeeded or not.

Thank you.

stepansnigirev commented 10 months ago

It happens when the function that is processing the request returns None. It is the case for any request that doesn't require any data to be sent back to the host, like adding a wallet. I guess, I should do it slightly differently - response should be bool or a stream