nunchuk-io / tap-protocol

Coinkite Tap Protocol
MIT License
15 stars 4 forks source link

Satscard::Satscard() succeeds when communicating with a Tapsigner #6

Closed PeteClubSeven closed 11 months ago

PeteClubSeven commented 11 months ago

Hey, not sure how much you consider this to be an issue but I wanted to test what would happen if the user gave my library invalid input (saying they want a Satscard but scanning a Tapsigner and vice versa). Interesting if you try to construct a Tapsigner and the transport communicates with a physical Satscard an exception will be thrown when validating the certificates. When you try to construct a Satscard out of a Tapsigner however, it succeeds despite istapsigner being true and it having no address.

This isn't a super pressing issue, I'll just validate the cards by checking istapsigner == false but it might be worth adding extra error checking at some point 👍

giahuy98 commented 11 months ago

Thanks for reporting, fixed in #7.

PeteClubSeven commented 11 months ago

Amazing thanks a lot!