Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Segwit transaction used as UTXO in non-segwit transaction causes Internal Error #226

Open
kantai opened this issue Oct 13, 2018 · 1 comment
Assignees

Comments

@kantai
Copy link

kantai commented Oct 13, 2018

If one of the UTXOs for a transaction comes from a segwit transaction, and the transaction itself is non-segwit, then an internal error is triggered on the Ledger app.

See this issue:

LedgerHQ/app-bitcoin#57

I am pretty sure that the issue is somewhere around here for single-sig TXs:

https://github.com/LedgerHQ/ledgerjs/blob/master/packages/hw-app-btc/src/Btc.js#L561

And here for P2SH TXs:

https://github.com/LedgerHQ/ledgerjs/blob/master/packages/hw-app-btc/src/Btc.js#L832

I believe this is caused by the JS library sending a segwit formatted TX to the hardware device for preparing a trusted input. I only tested this with P2SH transactions, but I believe it to be the case for the normal P2PKH transactions as well (it looks like it makes the same assumption that all inputs to a P2PKH transaction will be non-segwit).

@kantai
Copy link
Author

kantai commented Jan 9, 2019

Any update here?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants