-
Notifications
You must be signed in to change notification settings - Fork 374
Error on getWalletPublicKey with BTC app v2 #733
Comments
Hi, This is a critical issue for us because it prevents any operation with Ledger and Bitcoin on production. I would appreciate any feedback on this. I'm still not sure if we are doing something wrong on our side, if we are missing a breaking change or if there is any workaround that we could apply to solve this. Thanks. |
@greweb hi! I tagged you but Im not sure if you are the proper one, could you check if this is a pending bug and if its on queue? Thanks! |
Ok thanks for the report, we'll look at the issue shortly. |
@gre I spent some time debugging this and I think there may be an issue on the clientCommand.ts where you apply the subarray function because it returns an Uint8Array running on a browser instead of a Buffer (like on Node.js). I think that a potential fix could be to convert the result of the subarray to a Buffer using
So in order to make it work in a browser, you may need to change the following lines too:
to const req = Buffer.from(request.subarray(1));
to Buffer.from(known_preimage.subarray(0, payload_size)),
to const req = Buffer.from(request.subarray(1));
to const req = Buffer.from(request.subarray(1));
Thanks! |
Hi,
I'm experimenting an error since I updated my BTC app on the Ledger device to v2.0.0 (Firmware is 2.0.0 but it can be reproduced with 2.1.0 too).
When I try to read an address using getWalletPublicKey, I receive tthe following error
TypeError: "list" argument must be an Array of Buffers
It breaks here
ledgerjs/packages/hw-app-btc/src/newops/clientCommands.ts
Line 84 in 4bcf5bb
I'm using an standard path so I don't know what could be the issue.
I have created an small repo to reproduce this issue if you want to take a look
https://github.com/fabenedetti/ledger-read-btc-address
I think this happens only on the browser, because I have some tests that runs on node with the same params and I can't reproduce it there.
This breaks from @ledgerjs/hw-app-btc v6.10.0 (and later versions). It works if you downgrade to v6.7.0.
I noticed that you have a new implementation from BTC that it's only activated from BTC app v2, so I suspect that perhaps there could be something wrong related to this change. It works well with BCH and LTC v2 apps and those are still using the old implementation.
Thanks.
The text was updated successfully, but these errors were encountered: