diff --git a/src/seedsigner/models/decode_qr.py b/src/seedsigner/models/decode_qr.py index 9d07ed78..07f90b9c 100644 --- a/src/seedsigner/models/decode_qr.py +++ b/src/seedsigner/models/decode_qr.py @@ -255,10 +255,11 @@ class DecodeQR: return QRType.PSBTBASE64 # Wallet Descriptor - elif re.search(r'^p(\d+)of(\d+) ', s, re.IGNORECASE): + desc_str = s.replace("\n","").replace(" ","") + if re.search(r'^p(\d+)of(\d+) ', s, re.IGNORECASE): # when not a SPECTER Base64 PSBT from above, assume it's json return QRType.SPECTERWALLETQR - elif re.search(r'^\{\"label\".*\"descriptor\"\:.*', s, re.IGNORECASE): + elif re.search(r'^\{\"label\".*\"descriptor\"\:.*', desc_str, re.IGNORECASE): # if json starting with label and contains descriptor, assume specter wallet json return QRType.SPECTERWALLETQR