fix: remove empty message parameter from bip21 urls #750
+61
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #746
This PR removes the unnecessary empty
message=parameter from BIP21 Bitcoin addresses when copying them.Description
When copying on-chain or unified addresses, the app was appending an empty
?message=parameter:bitcoin:bcrt1q7ed23dp6qcq7z9nkqafw46qrulsp5rga40m820?message=This happened because
buildBip21Url()used?.letto check for null values, but empty strings passed through and still added the parameter. The fix changes bothlabelandmessageparameters to useisNullOrBlank()checks, consistent with howlightningInvoiceis already handled in the same function.Preview
Screen_recording_20260129_100429.webm
Screen_recording_20260129_100539.webm
QA Notes
1. Copy on-chain address without amount
?message=parameter appearsbitcoin:bcrt1q...(no query string)2. Copy unified address without amount
?message=in the Bitcoin portionbitcoin:bcrt1q...?lightning=lnbcrt...3. Receive with custom description
?message=YourMessageappears correctlybitcoin:bcrt1q...?message=YourMessage4. Receive with amount
bitcoin:bcrt1q...?amount=0.00001