Skip to content

Conversation

@jvsena42
Copy link
Member

@jvsena42 jvsena42 commented Jan 29, 2026

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 ?.let to check for null values, but empty strings passed through and still added the parameter. The fix changes both label and message parameters to use isNullOrBlank() checks, consistent with how lightningInvoice is 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

  1. Go to Receive > Savings
  2. Copy the address
  3. Paste and verify no ?message= parameter appears
  4. Expected: bitcoin:bcrt1q... (no query string)

2. Copy unified address without amount

  1. Go to Receive > Auto
  2. Copy the address
  3. Paste and verify no ?message= in the Bitcoin portion
  4. Expected: bitcoin:bcrt1q...?lightning=lnbcrt...

3. Receive with custom description

  1. Go to Receive > Savings
  2. Tap "Add description" and enter a message
  3. Copy the address
  4. Verify ?message=YourMessage appears correctly
  5. Expected: bitcoin:bcrt1q...?message=YourMessage

4. Receive with amount

  1. Go to Receive > Savings
  2. Set an amount (e.g., 1000 sats)
  3. Copy the address
  4. Verify address includes amount but no empty message
  5. Expected: bitcoin:bcrt1q...?amount=0.00001

@jvsena42 jvsena42 self-assigned this Jan 29, 2026
@jvsena42 jvsena42 requested a review from ovitrif January 29, 2026 13:06
@claude
Copy link

claude bot commented Jan 29, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@jvsena42 jvsena42 enabled auto-merge January 29, 2026 23:14
Copy link
Collaborator

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utAck

nit: we need to strong-type Bip21 logic handling DDD style, switching from "utils" like calls to actual calls on the entity/ model class with logic baked in.

@jvsena42 jvsena42 merged commit 177eeac into master Jan 30, 2026
13 checks passed
@jvsena42 jvsena42 deleted the fix/empty-message-parameter branch January 30, 2026 03:57
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

Successfully merging this pull request may close these issues.

Unnecessary empty?message= in onchain address

3 participants