Uh oh!
There was an error while loading. Please reload this page.
feat(deposit): invert the conversion graphic for USDC deposits - #1300
Merged
Conversation
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.
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
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 intocore-uiand parameterised by which coin sits on each side:AndroidFeatureConventionPluginalready putscore-uion every feature module's classpath, so no build file changes. The oldic_deposit_usdc_as_usdf.xmlhad no other references and is deleted;ic_withdraw_usdf_as_usdc.xmlstays, since the withdrawal screen still branches onisNewUifor 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.60fto0.80fto match the withdraw measure now that the line is longer. Both string keys are renamed off the USDF branding. NoisNewUigate here —FeatureFlag.NewUiislaunched = 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:isConvertingToDollarsonSwapViewModel.State, sitting next to the existingisConvertingFromDollars.Every other swap keeps its suffix. Both convert-direction flags were untested, so
SwapViewModelStateTestpicks 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.