cryptoadvance / specter-diy

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

Do not sign a psbt if specter does nit own any input #263

Open pythcoiner opened 10 months ago

pythcoiner commented 10 months ago

I experienced this during Liana wallet testing (see here), specter will sign a PSBT even if no input is owned (in my case I load the wrong key). Is there some reason to let sign such PSBT? Shouldn't specter at least warn the user he's going to sign this king PSBT?

stepansnigirev commented 9 months ago

Specter-DIY actually counts number of signatures that it is adding to the transaction. If 0 signatures are added it will show an error screen with the text like "We didn't add any signatures".

It's very strange that it was able to sign the transaction without any warnings if the key is not in the setup. Would be nice to have a test vector to reproduce it.