|
|
|
|
@ -149,6 +149,13 @@ class TestUtil(ElectrumTestCase):
|
|
|
|
|
def test_parse_URI_parameter_pollution(self): |
|
|
|
|
self.assertRaises(InvalidBitcoinURI, parse_bip21_URI, 'bitcoin:15mKKb2eos1hWa6tisdPwwDC1a5J1y9nma?amount=0.0003&label=test&amount=30.0') |
|
|
|
|
|
|
|
|
|
@as_testnet |
|
|
|
|
def test_parse_URI_unsupported_req_key(self): |
|
|
|
|
self._do_test_parse_URI('bitcoin:TB1QXJ6KVTE6URY2MX695METFTFT7LR5HYK4M3VT5F?amount=0.00100000&label=test&somethingyoudontunderstand=50', |
|
|
|
|
{'address': 'TB1QXJ6KVTE6URY2MX695METFTFT7LR5HYK4M3VT5F', 'amount': 100000, 'label': 'test', 'somethingyoudontunderstand': '50'}) |
|
|
|
|
# now test same URI but with "req-test=1" added |
|
|
|
|
self.assertRaises(InvalidBitcoinURI, parse_bip21_URI, 'bitcoin:TB1QXJ6KVTE6URY2MX695METFTFT7LR5HYK4M3VT5F?amount=0.00100000&label=test&req-test=1&somethingyoudontunderstand=50') |
|
|
|
|
|
|
|
|
|
@as_testnet |
|
|
|
|
def test_parse_URI_lightning_consistency(self): |
|
|
|
|
# bip21 uri that *only* includes a "lightning" key. LN part does not have fallback address |
|
|
|
|
|