Skip to content

feat(deposit): invert the conversion graphic for USDC deposits - #1300

Merged
bmc08gt merged 2 commits into
code/cashfrom
feat/usdc-to-dollars-conversion-graphic
Aug 21, 2026
Merged

feat(deposit): invert the conversion graphic for USDC deposits#1300
bmc08gt merged 2 commits into
code/cashfrom
feat/usdc-to-dollars-conversion-graphic

Conversation

@bmc08gt

Copy link
Copy Markdown
Collaborator

Follow-up to the v2 withdraw education screen: the deposit side (Add Money → Other Wallet) was still on the flattened v1 asset, which spelled the reserve as "USDF" and pointed the arrow the wrong way.

The graphic

Both directions now come from one composable, ConversionGraphic, hoisted out of the withdrawal feature into core-ui and parameterised by which coin sits on each side:

ConversionGraphic(from =ConversionCoin.UsdcOnSolana, to =ConversionCoin.Dollars)

AndroidFeatureConventionPlugin already puts core-ui on every feature module's classpath, so no build file changes. The old ic_deposit_usdc_as_usdf.xml had no other references and is deleted; ic_withdraw_usdf_as_usdc.xml stays, since the withdrawal screen still branches on isNewUi for it.

Hoisting surfaced an alignment bug worth calling out. The badged USDC art is 111x112 — a 100dp coin face plus the Solana badge overhanging its bottom-right corner — so center-aligning it against the flat 100dp Dollars coin put the two faces 6dp out of line. The shared component top-aligns and pads the arrow onto the face centre line instead.

Copy for the deposit screen is now "Your USDC will be converted 1:1 to Dollars on Flipcash", and the column widens from 0.60f to 0.80f to match the withdraw measure now that the line is longer. Both string keys are renamed off the USDF branding. No isNewUi gate here — FeatureFlag.NewUi is launched = true, so v2 is the only shell this screen renders in.

Art is Figma node 9216:19798.

The "of X" suffix

Separate commit. The swap success title reads <amount> of <currency>, which names what the user received — useful for a community currency, redundant for the reserve, where it rendered "$1.00 of Dollars". Suppressed for the two cases that land there:

  • Buy with a non-Flexible funding source, matching the condition the top bar already uses to decide it's "Adding Money".
  • Convert whose destination is the reserve, via a new isConvertingToDollars on SwapViewModel.State, sitting next to the existing isConvertingFromDollars.

Every other swap keeps its suffix. Both convert-direction flags were untested, so SwapViewModelStateTest picks them up.

The sell path also lands in the reserve and still reads "of Cash Reserves", but it's unreachable — its only entry point is the Sell button in the v1 ButtonOptions, which #1290 removes. Collapsing that branch is stacked on #1290 rather than done here.

iOS parity

code-payments/code-ios-app#620 mirrors both changes.

The Add Money -> Other Wallet education screen was still on the flattened
v1 asset, which spelled the reserve as "USDF" and pointed the arrow the
wrong way for a deposit.
Hoist the withdrawal screen's composed v2 art (node 9216:19798) into
core-ui as ConversionGraphic, parameterised by which coin sits on each
side, and point both screens at it. The convention plugin already wires
core-ui into every feature module, so neither build file changes.
Center-aligning the two coins was subtly wrong: the badged USDC art is
111x112 (a 100dp face plus the Solana badge overhanging its corner)
against a flat 100dp coin, so the two faces sat 6dp out of line. The
shared component top-aligns and nudges the arrow onto the face centre
line instead.
The deposit copy drops the USDF branding, and its measure widens to match
the withdraw screen now that the line is longer.
The swap success title reads "<amount> of <currency>", which names what
the user received. That only helps when the destination is a community
currency: adding money and converting into the reserve both rendered
"$1.00 of Dollars", where the amount alone already said it.
Suppress the suffix for those two, keeping it everywhere it still reads
correctly. Buy is matched on a non-Flexible funding source, mirroring the
condition the top bar already uses to show "Adding Money"; Convert gets
an isConvertingToDollars flag on the state, alongside the existing
isConvertingFromDollars.
Both convert-direction flags were untested, so cover them here.
@github-actionsgithub-actionsBot added area: payments Payments, transfers, intents, billing area: onramp Deposit, purchase, Coinbase, fiat on-ramp area: tokens Token accounts, balances, token info type: feature New functionality labels Aug 21, 2026
@bmc08gt
bmc08gt merged commit c86d81d into code/cashAug 21, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the feat/usdc-to-dollars-conversion-graphic branch August 21, 2026 20:01
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: onrampDeposit, purchase, Coinbase, fiat on-ramparea: paymentsPayments, transfers, intents, billingarea: tokensToken accounts, balances, token infotype: featureNew functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@bmc08gt