Skip to content
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

Error when signing transaction transferred via QR Code - Ledger Nano S #7257

Open
user5289361 opened this issue Apr 30, 2021 · 1 comment
Open
Labels
hw-ledger topic-transactions 📑 related to logic in transaction.py

Comments

@user5289361
Copy link

user5289361 commented Apr 30, 2021

Error when attempting to sign transaction with a Ledger Nano S after transferring unsigned transaction via QR Code to offline computer running Electrum.

Transaction transferred via QR code shows the following error upon attempting to sign with a Ledger Nano S:

Error: fromhex() argument must be str, not None

Log data provides the following information relating to the error:

20210429T072254.005389Z | INFO | plugin.DeviceMgr | getting client for keystore
20210429T072254.005389Z | INFO | plugin.DeviceMgr | scanning devices...
20210429T072254.061315Z | DEBUG | util.profiler | DeviceMgr.scan_devices 0.0559
20210429T072254.061315Z | INFO | plugin.DeviceMgr | end client for keystore
20210429T072254.092567Z | INFO | plugin.DeviceMgr | getting client for keystore
20210429T072254.092567Z | INFO | plugin.DeviceMgr | scanning devices...
20210429T072254.155052Z | DEBUG | util.profiler | DeviceMgr.scan_devices 0.0625
20210429T072254.155052Z | INFO | plugin.DeviceMgr | end client for keystore
20210429T072254.155052Z | INFO | plugin.DeviceMgr | getting client for keystore
20210429T072254.155052Z | INFO | plugin.DeviceMgr | scanning devices...
20210429T072254.204624Z | DEBUG | util.profiler | DeviceMgr.scan_devices 0.0496
20210429T072254.204624Z | INFO | plugin.DeviceMgr | end client for keystore
20210429T072254.204624Z | ERROR | plugins.ledger.ledger.Ledger_KeyStore |
Traceback (most recent call last):
File "C:\Program Files (x86)\Electrum\electrum\plugins\ledger\ledger.py", line 459, in sign_transaction
txtmp = bitcoinTransaction(bfh(utxo[0]))
TypeError: fromhex() argument must be str, not None
20210429T072254.204624Z | INFO | plugins.ledger.ledger | fromhex() argument must be str, not None

Other forms of transfer (text/USB file) are able to sign transaction correctly via the Ledger Nano S.
QR transfer of transaction appears to correctly transfer input and output for transaction, but fails with the above error at signing point.

Error log appears to have shown up in the past in relation to [ https://github.com//issues/3302 ], which relates to offline signing with Ledger Nano S requiring additional information to sign transaction.

This error is occurring with a nested segwit transaction.

@SomberNight
Copy link
Member

Ah right... This is in relation to #6293, where ledger started requiring full previous transactions even for segwit inputs.
Due to #6198 (and related CVE) most hardware wallets started to require this...

Other forms of transfer (text/USB file) are able to sign transaction correctly via the Ledger Nano S.
QR transfer of transaction appears to correctly transfer input and output for transaction, but fails with the above error at signing point.

The reason QR codes behave differently is because specifically for QR codes we don't include the full prev txs; QR codes have a small capacity and for all but the smallest of txs this compromise is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hw-ledger topic-transactions 📑 related to logic in transaction.py
Projects
None yet
Development

No branches or pull requests

2 participants