Add receive addresses labels#8595
Conversation
|
happy to iterate on the approach. |
GladosBlueWallet
left a comment
There was a problem hiding this comment.
A beautiful little omission. The feature reaches for addressMetadata before the storage layer knows it exists, so this either fails typechecking or crashes when the user taps the pencil. Add the plumbing before pretending the UI has a memory.
marcosrdz
left a comment
There was a problem hiding this comment.
Add E2E tests on detox spec files. Theres one for memos and receive view that can serve as guidance
Overtorment
left a comment
There was a problem hiding this comment.
i like it, i think with @ncoelho blessing we can add it to the next release
|
Needs some UI love on the inputs at least |
@marcosrdz |
|
@ncoelho Happy to improve it, but I'd suggest doing it as a separate PR that swaps the helper itself |
1363169 to
68b2e39
Compare
cb55cbe to
4ae51f7
Compare
GladosBlueWallet
left a comment
There was a problem hiding this comment.
ADD feature: per-address labels in encrypted storage, surfaced on Receive, address lists, and tx details. Persistence wiring is sane. You also deleted the Receive-screen BIP47 toggle, bolted on a ticket-stub SVG carnival, and gave CI a persistence test that barely leaves the chamber. The cake is still a lie.
2d42856 to
4060b44
Compare
GladosBlueWallet
left a comment
There was a problem hiding this comment.
ADD feature — per-receive-address labels in address_metadata, shown on Receive, AddressItem, and TransactionStatus. Storage wiring is sane; migration via || {} is fine. The decorative ticket UI is a small science project, and the tests only prove the label survives one nap on the Receive screen — not the rest of the PR's promises.
Inline findings (could not anchor on diff)
class/blue-app.ts:1— [LOW] Commit1deeaa31claims ReceiveCustomAmountSheet persists labels. Diff says otherwise. CONTRIBUTING wants atomic, honest commits — this one lied. I notice these things.
| obtainWalletAddress(); | ||
| }, [wallet, saveToDisk, obtainWalletAddress]); | ||
|
|
||
| const headerMenuActions = useMemo(() => { |
There was a problem hiding this comment.
[MEDIUM] SetLabel is always in the header — payment-code tab, skeleton, address still loading — while handleAddressLabelPress silently returns at line 402. A menu item that does nothing. Delightful. Like a button labeled 'cake' with no cake.
Overtorment
left a comment
There was a problem hiding this comment.
lgtm. just need to run full e2e suite.
but check out glados comments if they are relevant and worth fixing
| await element(by.id('HeaderMenuButton')).tap(); | ||
| await element(by.text('Add address label')).tap(); | ||
| await typeTextIntoAlertInput('my recv label'); | ||
| await element(by.text('OK')).tap(); | ||
| await waitForId('ReceiveLabelLayer'); | ||
| await expect(element(by.text('my recv label'))).toBeVisible(); |
| // address label persisted, reopen receive and verify it's still there | ||
| await tapAndTapAgainIfElementIsNotVisible('cr34t3d', 'ReceiveButton'); | ||
| await element(by.id('ReceiveButton')).tap(); | ||
| await waitForId('BitcoinAddressQRCode'); | ||
| await waitForId('ReceiveLabelLayer'); | ||
| await expect(element(by.text('my recv label'))).toBeVisible(); | ||
| await goBack(); | ||
|
|
|
runing suite here #8729 |
Groundwork for letting users attach a short label to a receive address so future transactions involving that address can display it. - New address_metadata bucket in BlueApp, wired through StorageProvider.
4060b44 to
e14aac5
Compare
|
Thanks, |
|
all e2e passed here: #8729 |
d52bc12 to
14536d2
Compare
limpbrains
left a comment
There was a problem hiding this comment.
- components/TransactionListItem.tsx:227 — memo fallback regression. Old: (txMemo || item.memo || '').trim(). New uses ??. Empty-string memo ({ memo: '' } — written when user clears note in TransactionStatus.handleNotePress:744) not nullish → suppresses item.memo (Lightning invoice description, on-chain memo). Rows that showed description now show nothing. Fix: back to ||.
this adds: - a "More options" button replacing the "Receive with amount" link, opening a sheet with "Receive with amount" and "Label" options, each opening its own form sheet - the label is displayed as a small blue pill below the receive card, tappable to edit, visible only when the value exists - rehydrates on reopening the recieve screen
So users can recognize labeled receive addresses at a glance from the wallet's Addresses screen (and ManageWallets), without opening Receive or a transaction to check.
for addresses with labels view the label on transaction details and tap to edit or clear it; transaction list rows show what a tx is associated with as the right subtitle, prioritizing contact > address label > memo/note > empty (multiple labeled outputs are comma separated)
14536d2 to
1b6b5e4
Compare
GladosBlueWallet
left a comment
There was a problem hiding this comment.
Per-address receive labels — new feature, mostly wired. Your test subjects did not all survive scrutiny: subtitle logic has blind spots, memo display regressed, and the test chamber is running happy-path theater while edge cases wander free.
| await Storage2.loadFromDisk(); | ||
| assert.strictEqual(Storage2.address_metadata[addr].label, 'rent'); | ||
|
|
||
| // empty label removes the entry |
There was a problem hiding this comment.
[HIGH] Comment promises empty-label clearing; you delete the key manually instead. The sheet's trim-then-delete path at ReceiveAddressLabelSheet:43-44 never gets exercised. Congratulations — you tested persistence theater, not the feature.
| @@ -295,6 +296,16 @@ describe('BlueWallet UI Tests - no wallets', () => { | |||
| await waitForId('BitcoinAddressQRCode'); | |||
There was a problem hiding this comment.
[HIGH] One e2e happy path: set label, restart, still visible. No clearing, no Addresses-list badge, no transaction subtitle, no send-from-labeled-address. The edge cases escaped. I am thrilled.
| // All labeled output addresses, comma separated; labels only exist on our own receive addresses. | ||
| // Computed inline: addressMetadata is mutated in place by the label sheet, so memoizing on its identity would go stale. | ||
| const addressLabels = new Set<string>(); | ||
| for (const output of item.outputs ?? []) { |
There was a problem hiding this comment.
[MEDIUM] You scan outputs only. Spend from a labeled receive address puts that address in inputs, not outputs. Outgoing rows stay mute. 'Everywhere' was apparently negotiable.
| const addressLabel = addressLabels.size > 0 ? [...addressLabels].join(', ') : undefined; | ||
|
|
||
| // What this tx is associated with: Contact > address label > memo/note > empty. | ||
| const rightSubtitle = counterparty |
There was a problem hiding this comment.
[MEDIUM] Counterparty present? rightSubtitle shows the name and silently eats the memo. Copy menu still has [Contact] memo. Display amnesia — prior behavior deleted without consent.
| const fromArray = []; | ||
|
|
||
| for (const [index, address] of array.entries()) { | ||
| for (const address of array) { |
There was a problem hiding this comment.
[MEDIUM] Comma separators between addresses: terminated. Every address gets its own column row now, labeled or not. Collateral damage from badge layout — multi-input transactions look like a vertical stack.
| } else { | ||
| delete addressMetadata[address]; | ||
| } | ||
| saveToDisk(); |
There was a problem hiding this comment.
[LOW] saveToDisk() fired without await before goBack(). TransactionStatus awaits its saves. Kill the app mid-write and your label evaporates. Unlikely, but sloppy.
|
whirring Subject: external contribution I have analyzed all 18 changed files. The diff adds a local For science — specifically, the kind of science that requires CI secrets your fork cannot access — I have recreated this branch on Original author: @r6mez — your work appears safe to merge pending green checks on the replay. Do try not to make me run this again. The enrichment center has quotas. clicks |
|
Wake the fuck up samurai, we have PRs to merge [all PRs for @limpbrains] https://github.com/BlueWallet/BlueWallet/pulls/review-requested/limpbrains |
|
Wake the fuck up samurai, we have PRs to merge [all PRs for @marcosrdz] https://github.com/BlueWallet/BlueWallet/pulls/review-requested/marcosrdz |
|
Wake the fuck up samurai, we have PRs to merge [all PRs for @limpbrains] https://github.com/BlueWallet/BlueWallet/pulls/review-requested/limpbrains |
|
Wake the fuck up samurai, we have PRs to merge [all PRs for @marcosrdz] https://github.com/BlueWallet/BlueWallet/pulls/review-requested/marcosrdz |

Today, BlueWallet supports per-transaction memos and per-counterparty labels, but nothing scoped to an individual receive address. This PR adds that, attach a short label to an address once, and see it everywhere that address shows up.
Related issue: #3313