Sjors / nthkey-ios

Your iOs device in a Bitcoin multi-sig
https://nthkey.com
MIT License
17 stars 7 forks source link

Scan to check should be case insensitive and ignore URI stuff #63

Closed Sjors closed 3 years ago

Sjors commented 3 years ago

When I scan a BIP 21 QR code it complains that the address is not found in the list.

This is probably because the format is bitcoin:BC1Q...?label=blah

When parsing an address, I suggest the following:

  1. check if it contains only alphanumeric characters: process as now
  2. parse it as a URI and obtain only the main part of it. Ideally use something like NSURL for this, rather than "manually" processing it, since that's safer.