1
0

pi: allow emaillike pi with 'lightning:' prefix

Lightning addresses with 'lightning:' do occur in the wild and make
sense (how else would e.g. the smartphone know to open a lightning
wallet instead of the e-mail client). So we should allow this.
This commit is contained in:
f321x
2025-12-22 10:04:24 +01:00
parent 2cd1de4f21
commit dd1d98e37c
2 changed files with 7 additions and 2 deletions

View File

@@ -378,6 +378,11 @@ class TestPaymentIdentifier(ElectrumTestCase):
'lnbcuser@some.domain',
'lnurluser@some.domain',
'bc1quser@some.domain',
'lightning:user@some.domain',
'lightning:user@some.weird.but.valid.domain',
'lightning:lnbcuser@some.domain',
'lightning:lnurluser@some.domain',
'lightning:bc1quser@some.domain',
)
for pi_str in email_pi_strings:
pi = PaymentIdentifier(None, pi_str)