Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI] "Send" dialog could give more feedback on what's wrong with BIP21 URI #12150

Open
kristapsk opened this issue Dec 27, 2023 · 3 comments
Open

Comments

@kristapsk
Copy link
Collaborator

kristapsk commented Dec 27, 2023

Test URI - bitcoin:TB1QXJ6KVTE6URY2MX695METFTFT7LR5HYK4M3VT5F?amount=0.00100000&label=test&req-test=1.

Wasabi currently just says "Input a valid BTC address or URL." (which is URI, not URL, btw), without any details. In this case it's unknown required parameter req-test=1.

Also, I cannot see whole pasted URL, right arrow keys or End key doesn't help.

image

In comparison, sendpayment.py script of JoinMarket gives you the reason.

$ ./scripts/sendpayment.py testnet-test-123.jmdat "bitcoin:TB1QXJ6KVTE6URY2MX695METFTFT7LR5HYK4M3VT5F?amount=0.00100000&label=test&req-test=1"
User data location: /home/user/.joinmarket/
2023-12-27 19:19:19,474 [DEBUG]  rpc: getblockchaininfo []
2023-12-27 19:19:19,476 [DEBUG]  rpc: listwallets []
2023-12-27 19:19:19,476 [DEBUG]  rpc: getwalletinfo []
Traceback (most recent call last):
  File "/home/user/git/joinmarket-clientserver/./scripts/sendpayment.py", line 378, in <module>
    main()
  File "/home/user/git/joinmarket-clientserver/./scripts/sendpayment.py", line 74, in main
    parsed = btc.decode_bip21_uri(args[1])
  File "/home/user/git/joinmarket-clientserver/src/jmbitcoin/bip21.py", line 35, in decode_bip21_uri
    raise ValueError("Unknown required parameter " + key +
ValueError: Unknown required parameter req-test in BIP21 URI.
@kristapsk
Copy link
Collaborator Author

JoinmarketQt GUI also outputs the reason.

image

@kristapsk
Copy link
Collaborator Author

Also Blockstream Green.

image

@wieslawsoltes wieslawsoltes changed the title "Send" dialog could give more feedback on what's wrong with BIP21 URI [UI] "Send" dialog could give more feedback on what's wrong with BIP21 URI Jan 2, 2024
@kristapsk
Copy link
Collaborator Author

Electrum didn't have check for this at all, implemented it recently (spesmilo/electrum#8789), error they give now is - "Unsupported key - req-test".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant