Conversation
Introduce Search type for tracking asset selection in the search flow. Add UpdateRecentAsset coordinator with DI wiring. Wire updateRecent into BaseAssetSelectViewModel and all subclasses.
Separate manage (toggle visibility) and search (browse/pick assets) into dedicated screens. Record RecentType on asset selection for Buy and Receive flows. Add onSelectRecent callback to separate chip tap (navigate only) from list tap (record + navigate). Hide filter icon on search screen. Rename populartShowed to showPopular.
Replace heavy asset_info query with lightweight query on asset table. Return Flow<List<Asset>> instead of Flow<List<AssetInfo>>. Add AssetFilter enum (Buyable, Swappable, HasBalance) with SQL-level filtering via NOT IN + hasFilters guard pattern. Decouple recents from user chain/balance toggles using snapshotFlow on query text only. Order by MAX(addedAt) DESC with deterministic tiebreaker.
Remove addRecentReceive from GetReceiveAssetInfoImpl (was recording on every Receive screen load, causing chip-tap reorder bug). Remove addBuyRecent from FiatViewModel (redundant with selection recording). Delete AddBuyRecent interface, impl, and DI registration. Remove unused convenience methods from AddRecentActivity.
Verify per-flow asset filter contracts: Buy filters to buyable, Send filters to has-balance, Receive has no filters. Verify RecentAssetsRequest defaults and filter composition.
DRadmir
approved these changes
Apr 14, 2026
gemcoder21
approved these changes
Apr 14, 2026
| LocalContentColor.current | ||
| else | ||
| MaterialTheme.colorScheme.primary, | ||
| contentDescription = "Filter by networks", |
Contributor
There was a problem hiding this comment.
Suggested change
| contentDescription = "Filter by networks", | |
| contentDescription = null |
| scrollable = true, | ||
| equalWidth = false, | ||
| ) { item -> | ||
| val stringId = when (item) { |
Extract AssetTag-to-string mapping into a new AssetTagExt.labelRes() extension (android/ui/.../AssetTagExt.kt) and replace the when block in AssetSelectScene with stringResource(item.labelRes()). Also set the filter icon's contentDescription to null. Centralizes label logic and cleans up the scene view code.
Add tools:replace="android:dataExtractionRules" to the application element in AndroidManifest.xml so the app can override android:dataExtractionRules during manifest merging (resolving conflicts or allowing a custom data extraction rules entry from the app).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes #130
Summary
Implement the recents feature for asset selection flows on Android, matching iOS behavior. Track recently selected assets and display them as chip shortcuts across Send, Buy, Receive, Swap, and Search screens. Split Manage and Search into dedicated screens. Disable asset detail navigation on Manage. Hide tags and filter icon during search.
Changes
Screen split
AssetsManageScreeninto dedicatedAssetsManageScreen(toggle visibility) andAssetsSearchScreen(browse/pick assets with recents recording)onSelect = null), only the Switch toggles visibilityavailableChains = emptyList()), recordsRecentType.Searchon asset selectionAssetsManageNavigationto routeassetsManageRoute→AssetsManageScreen,assetsSearchRoute→AssetsSearchScreenUI behavior (matching iOS)
TabsBar) hide when search query is active (showTags = query.text.isEmpty())availableChainsis empty (search screen)onSelectRecentcallback onAssetSelectScene— chip taps navigate only, list taps may recordpopulartShowed→showPopularRecents recording (matching iOS)
BuytypeReceivetypeSearchtypeGetReceiveAssetInfoImpl(was recording on every Receive screen load, causing chip-tap reorder bug) andFiatViewModel(was double-recording on Buy quote fetch)Lightweight recents query
assettable directly instead of the heavyasset_infoview — no balance/price/metadata loaded for chips that only render icon + symbolAssetFilterenum (Buyable, Swappable, HasBalance) withNOT :flag OR conditionpatternRecentAssetsRequestdata class encapsulates query parametersORDER BY MAX(addedAt) DESC, id ASCfor deterministic orderingsnapshotFlowon query text onlyViewModel updates
getRecentType(): RecentType?→open val showRecents: Boolean(property, not function)open fun assetFilters(): Set<AssetFilter>hook with per-flow overrides (Buy=Buyable, Send=HasBalance, Swap=Swappable)UpdateRecentAssetcoordinator +updateRecent()method onBaseAssetSelectViewModelPriceAlertsSelectViewModel:showRecents = falseDead code cleanup
AddBuyRecentinterface, impl, and DI registrationAddRecentActivityaddBuyRecentinjection fromFiatViewModelFiatViewModelTestto match updated constructorNew files
AssetFilter.kt— enum: Buyable, Swappable, HasBalanceRecentAssetsRequest.kt— query parameters data classUpdateRecentAsset.kt+UpdateRecentAssetImpl.kt— coordinator for recording recentsAssetsSearchScreen.kt— dedicated search screenRecentAssetsConfigTest.kt— tests for per-flow filter contractsiOS parity checklist
assettable