unit-e
unit-e copied to clipboard
Signing transactions on a Ledger Nano fails on a Mac sometimes
Describe the bug
While testing the feature on Mac OS, it seems that the USB device communication randomly fails about 50% of the time. The response packets we receive are malformed: instead of 00 01 00 01 05 00 00... we get 00 01 00 01 05 00 bf 00 01 04.
To Reproduce Steps to reproduce the behavior:
- Comment out the lines in
usbdevice::ListDeviceswhich return a mock device on regtest. - Build Unit-e on a Mac, passing
--enable-usbdevicein the configuration. - Connect the Ledger Nano S, unlock it and launch the Unit-e app on it.
- Run
test/functional/wallet_hwsign.pyand watch it fail.
Expected behavior The user should be prompted to sign two transactions on the device.
Environment
- OS: Mac OS
- UnitE version: compiled from the
ledgerbranch.
Additional context It looks like, when we're enumerating interfaces for the device, they're returned in a random order, so we sometimes query the wrong one and get wrong results in return.