Skip to content

Swap select recents#458

Open
gemdev111 wants to merge 9 commits into
mainfrom
swap-select-recents
Open

Swap select recents#458
gemdev111 wants to merge 9 commits into
mainfrom
swap-select-recents

Conversation

@gemdev111
Copy link
Copy Markdown
Contributor

closes #457

gemdev111 added 9 commits June 3, 2026 17:17
Make UpdateRecentAsset symmetric with GetRecentAssets and ClearRecentAssets,
which already resolve the active wallet internally. The coordinator now reads
the session wallet itself instead of taking a walletId, so callers (and the
perpetuals view model) no longer have to thread it through.
Record a recent activity when a perpetual is opened, and surface recent
perpetuals as a chip row when entering search (matching iOS). Selecting a
recent navigates without re-recording (no reordering), and the "Recent"
header opens the shared recents sheet for the full list.

Add a centered "No markets found" empty state (SearchPerpetuals) shown only
while searching, with the standard search icon + "check spelling" subtitle.
Recents hide once a query is typed, and search state is retained across the
perpetual-details round-trip.
Show a centered "No markets found" overlay when a search returns nothing,
using a new .search(type: .perpetuals) empty type, replacing the inline
placeholder text and its lonely "Markets" section header. Hide recents once
a query is typed so the empty state stands alone, and drop the now-unused
emptyText path from PerpetualSectionView.
# Conflicts:
#	android/features/perpetual/presents/build.gradle.kts
#	android/features/perpetual/presents/src/main/kotlin/com/gemwallet/android/features/perpetual/views/market/PerpetualMarketNavScreen.kt
New RecentActivityType/RecentType variant to distinguish assets picked in
the swap selector from completed swaps. Added to the core enum, regenerated
iOS/Android bindings, and Android's hand-written RecentType.
Picking an asset in the swap pay/receive selector records a SwapSelect
recent (SelectAssetType.swap -> .swapSelect), and the selector shows
recents scoped to [swapSelect, swap]. Selecting an existing recent
completes without re-recording, matching the other selectors. Completed
swaps keep their distinct .swap type. Adds SelectAssetType mapping tests.
The swap selector records a SwapSelect recent on pick and shows recents
scoped to [SwapSelect, Swap] via an overridable recentTypes on
BaseAssetSelectViewModel. Re-tapping a recent does not re-record.
Completed swaps keep RecentType.Swap.
RecentsSceneViewModel clear now clears only the types the sheet was opened
with instead of all recent types, so clearing from the swap (or perpetual)
selector no longer wipes unrelated recents.
# Conflicts:
#	android/gemcore/src/main/kotlin/com/gemwallet/android/model/RecentType.kt
@gemdev111 gemdev111 self-assigned this Jun 4, 2026
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.

Integrate SelectSwap recent state

1 participant