Skip to content

chore(tokens): drop the unreachable sell branch from the swap success title - #1301

Merged
bmc08gt merged 1 commit into
chore/tear-out-v1-uifrom
chore/drop-dead-sell-branch
Aug 21, 2026
Merged

chore(tokens): drop the unreachable sell branch from the swap success title#1301
bmc08gt merged 1 commit into
chore/tear-out-v1-uifrom
chore/drop-dead-sell-branch

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #1290 — base it there, not code/cash. Merge that first.

#1290 guts TokenInfoScreen.kt (-404 lines), taking the v1 ButtonOptions Sell button with it. That was the only place a SwapPurpose.Sell was ever constructed; the v2 action row offers Give, Convert, and Withdraw. So the swap-processing success title can no longer be reached as a sell.

That title's else arm existed to name the reserve for exactly that case:

is SwapPurpose.Convert -> state.destinationTokenName
is SwapPurpose.BalanceIncrease -> state.tokenName
else -> stringResource(R.string.title_cashReserves)

Now it catches only a sell that can't happen and a null purpose. This makes the two reachable purposes explicit and lets the fallback go unnamed rather than claim a destination it can't have — Fiat.formatted already takes a nullable suffix, so no signature change. title_cashReserves had no other reference and goes with it.

Deliberately left alone

  • SwapPurpose.Sell and BalanceDecrease stay. Sell is unreachable but still referenced by SwapViewModel (5 sites), AppRoute.kt:226, and the still-routed TokenSellReceiptScreen, plus two tests. Deleting the type is a much wider change than this one — worth its own PR. BalanceDecrease is also implemented by Convert.
  • canSell stays — it's a computed property the Convert flow reads at TokenInfoViewModel.kt:336 to gate the "no balance yet" bottom bar.
  • action_sell stays — still used by TokenSellReceiptScreen.kt:74.

Conflict note

feat/usdc-to-dollars-conversion-graphic (commit 602ac8960) touches this same when to suppress the "of " suffix for non-Flexible Buy and reserve-bound Convert. Both changes converge on a nullable suffix, so resolution is mechanical — keep that branch's Buy/Convert arms and this branch's dropped sell fallback.

… title

Tearing out the v1 UI removed the Sell button from the token screen, which
was the only place a SwapPurpose.Sell could be constructed. The v2 action
row offers Give, Convert, and Withdraw, so nothing can reach the success
title as a sell any more.

The title's `else` arm existed to name the reserve for that case. Make the
two reachable purposes explicit and let the fallback go unnamed rather than
claim a destination it can no longer have; the suffix was already optional.
title_cashReserves had no other reference, so it goes with it.

SwapPurpose.Sell itself stays: it is unreachable but still referenced by
SwapViewModel, AppRoute, and the sell receipt screen, so removing the type
is a larger change than this one. canSell stays too — Convert reads it.
@github-actions github-actions Bot added area: tokens Token accounts, balances, token info type: chore Maintenance, config, CI/CD labels Aug 21, 2026
@bmc08gt
bmc08gt merged commit f2399d4 into chore/tear-out-v1-ui Aug 21, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the chore/drop-dead-sell-branch branch August 21, 2026 21:47
bmc08gt added a commit that referenced this pull request Aug 26, 2026
… title (#1301)

Tearing out the v1 UI removed the Sell button from the token screen, which
was the only place a SwapPurpose.Sell could be constructed. The v2 action
row offers Give, Convert, and Withdraw, so nothing can reach the success
title as a sell any more.

The title's `else` arm existed to name the reserve for that case. Make the
two reachable purposes explicit and let the fallback go unnamed rather than
claim a destination it can no longer have; the suffix was already optional.
title_cashReserves had no other reference, so it goes with it.

SwapPurpose.Sell itself stays: it is unreachable but still referenced by
SwapViewModel, AppRoute, and the sell receipt screen, so removing the type
is a larger change than this one. canSell stays too — Convert reads it.
bmc08gt added a commit that referenced this pull request Aug 26, 2026
… title (#1301)

Tearing out the v1 UI removed the Sell button from the token screen, which
was the only place a SwapPurpose.Sell could be constructed. The v2 action
row offers Give, Convert, and Withdraw, so nothing can reach the success
title as a sell any more.

The title's `else` arm existed to name the reserve for that case. Make the
two reachable purposes explicit and let the fallback go unnamed rather than
claim a destination it can no longer have; the suffix was already optional.
title_cashReserves had no other reference, so it goes with it.

SwapPurpose.Sell itself stays: it is unreachable but still referenced by
SwapViewModel, AppRoute, and the sell receipt screen, so removing the type
is a larger change than this one. canSell stays too — Convert reads it.
bmc08gt added a commit that referenced this pull request Aug 26, 2026
* chore(ui): tear out the v1 UI behind the newUI flag

`FeatureFlag.NewUi` launched, so every `isNewUi` branch had exactly one live
side. This removes the flag and collapses those branches, then deletes the v1
surfaces that are stranded once the branch is gone.

Removed
- `FeatureFlag.NewUi` and `FeatureFlag.NavBar` (the v1 nav-bar config flag),
  plus the Labs "Nav Bar" settings screen that edited it.
- The v1 scanner chrome: `DecorView`, `ScannerDecorItem`,
  `ScannerNavigationBar`, `LongPressDraggable`, `NavBarConfig`,
  `GiveButtonLabel`.
- `apps/flipcash/features/home` — the v1 home host, unreferenced once the nav
  bar is hoisted to the app root. Dropped from `settings.gradle.kts`.
- The v1 balance surface (`BalanceScreen`, `BalanceScreenContent`,
  `CashReservesRow`) and the v1 currency-info sections (`TokenBalance`,
  `TokenDetails`), superseded by the wallet deck and `CurrencyInfoContentV2`.
- `CurrencyCreatorUpsellCard` — the creator promo lives on the wallet now.

UI tests
The Maestro suite still drove v1 affordances (a "Tips"/"Discover"/"Cash" tab
row, a `menu_button`, a swipe-down sheet dismissal), so it is retargeted to the
v2 tab model rather than left to fail:
- `NavigationBar` tabs are tagged `nav_scanner` / `nav_wallet` / `nav_chats` /
  `nav_tipcard`; `helpers/close_open_sheet.yaml` unwinds to the scanner tab.
- `SwapStep.Entry` is explicitly tagged `swap_screen` (the derived id would be
  `entry_screen`); `buy.yaml` / `sell.yaml` already anchored on `swap_screen`.
- `CurrencyInfoExpansion` carries the `token_info_screen` anchor too, since in
  v2 a wallet card expands as an overlay instead of pushing the screen.
- The chats list is tagged `chat_list`.
- `buy.yaml`/`sell.yaml` follow v2 swap semantics ("Get" on a currency you do
  not hold, "Convert" in place of "Sell"), give flows enter via
  Wallet → currency → Give, and `BaselineProfileGenerator` journeys switch tabs
  instead of tapping v1 labels.

* chore(tokens): drop the unreachable sell branch from the swap success title (#1301)

Tearing out the v1 UI removed the Sell button from the token screen, which
was the only place a SwapPurpose.Sell could be constructed. The v2 action
row offers Give, Convert, and Withdraw, so nothing can reach the success
title as a sell any more.

The title's `else` arm existed to name the reserve for that case. Make the
two reachable purposes explicit and let the fallback go unnamed rather than
claim a destination it can no longer have; the suffix was already optional.
title_cashReserves had no other reference, so it goes with it.

SwapPurpose.Sell itself stays: it is unreachable but still referenced by
SwapViewModel, AppRoute, and the sell receipt screen, so removing the type
is a larger change than this one. canSell stays too — Convert reads it.

* test(maestro): repoint the E2E flows at the v2 surfaces

Every flow started from `scanner_screen`, which is no longer where login lands
(`homeRoute = AppRoute.Sheets.Wallet`), and the entry points they tapped moved
with the tab rework:

- Add Money and Withdraw Money are wallet action tiles now, at the bottom of a
  scrollable list, so each entry needs a `scrollUntilVisible` — as do Discover
  Currencies and Create a Currency, which were already tiles.
- Log Out moved from My Account to Advanced; App Settings is gone entirely
  (`navigate_to_app_settings.yaml` and its screenshot leg with it).
- The Add Money sheet is titled "Add Money With", and Withdraw opens on the
  currency picker because it carries no preselected mint.
- The You tab leads with the tip card, so its list rows sit below the fold.

Three flows were pinned to positions in live data. `buy.yaml` assumed
leaderboard row 0 offers "Get", which it only does for a currency the account
does not already hold, so it now walks the first four rows. `blocking.yaml` and
`tip_chat.yaml` took chat row 0, which is the account's own self-tip chat, and
now select the participant by name.

`vanity_deeplink_self.yaml` cleared app state to force a cold start, which wiped
the account too and only ever reached the login screen; it stops the app
instead. `login.yaml` now clears state so it starts logged out, and
`share_cashlink.yaml` waits for the confirm prompt rather than tapping into its
animation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tokens Token accounts, balances, token info type: chore Maintenance, config, CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant