Skip to content

Own the NFT listing mode in one place - #974

Merged
DRadmir merged 2 commits into
mainfrom
wt3/nft-list-mode
Aug 26, 2026
Merged

Own the NFT listing mode in one place#974
DRadmir merged 2 commits into
mainfrom
wt3/nft-list-mode

Conversation

@DRadmir

@DRadmir DRadmir commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

The NFT list screen is used for three things: all collections, one collection, and unverified collections. Which one it was had to be pieced together from route arguments in one place and from which callbacks the screen was given in another, so the two halves could disagree.

Now the screen figures out its mode once, and the title, the receive button and the unverified row follow from it.

Also removes the NFT error state and its "Try again" screen — nothing ever set it, so it could never appear.

The NFT list screen served three routes plus the wallet-screen preview, and
which listing it was got reassembled from two route arguments in the view
model and three nullable callbacks in the composable.

Derive an NftListMode once from the route arguments and pass it down, so the
title, the receive action and the unverified row follow from it instead of
from which callbacks a route left out.

Drop the NFT error state and its UI: nothing ever wrote it, so the branch was
unreachable and NftError had no remaining users.
@DRadmir DRadmir self-assigned this Aug 26, 2026
@DRadmir
DRadmir marked this pull request as draft August 26, 2026 03:30
Three switches over the mode in a row were a policy table in a function that
otherwise only renders already-resolved state. Keep the exhaustive switch for
the title, where a new mode has to choose a string, and read the mode directly
where it decides the receive action and the unverified row.

Drop the route argument test with it: it restated the mapping line by line
without covering the metadata the routes actually set.
@DRadmir
DRadmir marked this pull request as ready for review August 26, 2026 03:50
@DRadmir
DRadmir merged commit 1b973ec into main Aug 26, 2026
1 check passed
@DRadmir
DRadmir deleted the wt3/nft-list-mode branch August 26, 2026 03:51
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.

1 participant