sparrowwallet/drongo

Potentially non-compliant BIP-21 implementation

Closed this issue · 1 comments

Hi there! Thanks a lot for all you do on Sparrow, I'm a big fan and user.

I'm an Android developer and I've been working on some Kotlin bitcoin libraries and was taking a look at the BIP-21 implementation in Drongo. I noticed that the testSamourai test case used a comma in the amount, and that this is, according to the BIP, non-compliant:

All amounts MUST contain no commas and use a period (.) as the separating character to separate whole numbers and decimal fractions. I.e. amount=50.00 or amount=50 is treated as 50 BTC, and amount=50,000.00 is invalid.

I wasn't sure if this was on purpose (I notice the implementation replaces the comma with a dot), maybe to be compatible with Samourai (as the name of the test would imply). Just figured I'd point it out.

Cheers!

Thanks - it's been almost 3 years now so I can't remember the exact circumstances, but I looks like one of those cases where it's better to be permissive than strictly compliant :). BIP21 has been abused by others as the implementation notes wrt blockchain.info, so I decided to follow Postel's law on this.