AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 48 Monero

Wallet picker follow-ups to #3717 (#3729)

Public commit record

What the developer wrote

Authored by Omar Hatem

76/100 · Adequate
Wallet picker follow-ups to #3717 (#3729)

* fix(address-book): wallet picker follow-ups to #3717

- addressForBuy now skips hiddenAddresses, like the receive page's own
address selection. Every swap hides its refund address, so on the
Lightning/Silent Payments page the picker's on-chain "Active" entry
(from #3717) could be that refund address. Buy-provider payouts stop
landing on hidden addresses too.
- The picker decided "active" with name.contains('Active'), but the name
is localized first ("Aktiv", "Activo", ...), so BTC/LTC wallets were
missing from it in every language but English. WalletContact now
carries the raw address-map label and the filter matches on that.
- On the Silent Payments page the SP address is marked active again,
next to the on-chain one. The picker offers SP addresses only when the
caller opts in; the send page does for software Bitcoin wallets.
Hardware/air-gapped senders can't build SP outputs, and swap or
Lightning-withdraw inputs never opt in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(address-book): trim comments; gate SP picker on hasSilentPaymentsScanning

Bugbot: wallets restored from an xpub have no hardwareWalletType, so they were
offered Silent Payments addresses they can't pay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(address-book): offer SegWit instead of Silent Payments/MWEB in wallet picker

Reverts the Silent Payments opt-in. A Bitcoin wallet on its Silent Payments or
Lightning page, and a Litecoin wallet on its MWEB page, now expose a plain SegWit
address as 'Active', so every sender gets an address it can pay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(litecoin): use addressForBuy for the MWEB page's address-book entry

Litecoin's addressForBuy now returns a regular address on the MWEB page, so the
buy flow and other wallets' address books both get an address every sender can pay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(address-book): offer a Litecoin wallet's MWEB address when it's on the MWEB page

A user who left wallet A on MWEB expects other wallets to send to that MWEB
address. Litecoin's addressForBuy still returns a regular address there, so
the buy flow is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(bitcoin): drop the unneeded Litecoin activeAddress parameter

Litecoin only has P2WPKH and MWEB pages, so its active address is always
`address`. electrum_wallet_addresses.dart is back to dev's version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes address-selection bugs in Cake Wallet's address book and wallet picker. Before the fix, the app could suggest Bitcoin/Litecoin addresses that the sending wallet couldn't actually pay (for example, a hidden swap refund address, a Silent Payments address for a hardware wallet, or a Litecoin MWEB address). It also relied on the English word 'Active' in a translated name, so non-English users saw fewer wallets. The patch makes the picker choose only plain, broadly-supported addresses for buy/exchange flows and uses an untranslated label to decide which address is active.

Recommended action

Treat as a defensive bug-fix commit with possible funds-impact. Review the related PR #3717 and any prior release to confirm whether the buggy picker behavior reached production. Verify that hiddenAddresses correctly excludes all swap refund addresses and that no other callers still match on translated names. Consider whether a security advisory is warranted if users could have sent funds to unspendable/hidden addresses.

Security signals we found

01

Funds-loss risk: picker could select addresses the sender cannot pay (Silent Payments, MWEB, hidden refund addresses).

02

UI/logic bug: active-address detection relied on localized string matching, breaking for non-English users.

03

Address reuse/privacy concern: hidden swap refund addresses could be offered as buy/exchange destinations.

04

Partial fix follow-up: commit message notes iterative refinement and reverts an earlier Silent Payments opt-in.

05

New unit tests cover the changed selection logic.

Risk score

Why this scored 48/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 7/15
Affected reach 10/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.