[electrum] remove support for signed payment requests in URIs
Summary:
This was added in 2015, and I'm not aware of any use case for it today. This feature makes it hard to decouple BIP21 payments URIs from BIP70 payment requests, so it makes it harder to extend BIP21 with multiple destination and amounts.
BIP72 states that:
when Bitcoin wallet software that supports this BIP receives a bitcoin: URI with a request parameter, it should ignore the bitcoin address/amount/label/message in the URI and instead fetch a PaymentRequest message and then follow the payment protocol, as described in BIP 70.
After this diff, the "sig", "name", "exp", "memo" and "time" field are still used for internal dict representation of payment requests, but they should no longer affect payment URIs.
See following commits for the introduction of the parameters that this diff removes:
https://github.com/spesmilo/electrum/commit/9c30ad3dd5fb10832579e858c3cfdded06444dad
https://github.com/spesmilo/electrum/commit/e77f0c9
https://github.com/spesmilo/electrum/commit/0cef063ee231cc9459dff6829dc33ffc2ed499e2
https://github.com/spesmilo/electrum/commit/a6c65b8997c2407502edbe5cc9d818722e1db2cd
Test Plan:
python test_runner.py
Test that a regular BIP72 payment URI still works:
- Generate a payment request: curl -L -H 'Content-Type: application/json' -d '{"outputs":[{"address":"1NLcNpAaBBMekgBZk7NxwdxwtSUTfTV8Aq","amount":560}],"currency":"ecash"}' https://pay.badger.cash/create_invoice
- Run ./electrum-abc
- In the send tab, paste ecash:?r=https://pay.badger.cash/i/JFPTG (replace the URL with the one returned by the above curl command
- Send
Reviewers: #bitcoin_abc, bytesofman
Reviewed By: #bitcoin_abc, bytesofman
Subscribers: bytesofman
Differential Revision: https://reviews.bitcoinabc.org/D15221