Skip to content

#1176: Show all on-chain assets in receive amount dropdown#1264

Open
Maxnflaxl wants to merge 2 commits into
masterfrom
issue/1176
Open

#1176: Show all on-chain assets in receive amount dropdown#1264
Maxnflaxl wants to merge 2 commits into
masterfrom
issue/1176

Conversation

@Maxnflaxl

Copy link
Copy Markdown
Member

Fixes #1176.

Problem

On the Receive screen, the "requested amount" asset picker only listed assets the wallet already held (getAssetsNZ() — non-zero balance). A confidential asset could not be requested unless you already owned it.

Changes

  • Show all on-chain assets in the receive picker. The receive view now loads the full on-chain asset list (getAssetsListFull()) in the background when it opens, falling back to the wallet's held assets as an instant placeholder until the list arrives. The picker is always enabled so a CA can be chosen even in a BEAM-only wallet, and the current selection is re-mapped by asset id when the list grows.
  • Coalesce asset-list updates. AssetsManager::onAssetInfo previously emitted assetsListChanged on every asset-info reply. Rebuilding the full ~200-asset list once per reply is O(N²) and froze the UI while a burst of replies drained (e.g. navigating away with the dropdown open). The signal is now debounced through a 100 ms single-shot timer so a burst collapses into one rebuild. This benefits every consumer of the list (send, settings, asset swap).

Testing

Built and verified in a Release build: the receive picker lists all on-chain assets, a non-held CA can be selected by typing its AID into the search box, BEAM remains the default, the Send picker is unchanged, and navigating away with the dropdown open no longer hangs.

Maxnflaxl added 2 commits July 3, 2026 14:04
onAssetInfo emitted assetsListChanged on every asset-info reply. With
the small held-assets list that was cheap, but rebuilding the full
on-chain list (~200 assets) once per reply is O(N^2) and freezes the UI
while a burst of replies drains. Debounce the signal through a 100ms
single-shot timer so a burst collapses into one rebuild.
The requested-amount picker only listed assets the wallet already held,
so a confidential asset couldn't be requested unless you owned it. Load
the full on-chain list in the background when the receive view opens,
falling back to the held-assets list until it arrives. Keep the picker
always enabled so a CA can be chosen even in a BEAM-only wallet, and
re-map the current selection by asset id when the list grows.
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.

CA only shows up in "requested amount" dropdown of receive screen if CA is in wallet

1 participant