Uh oh!
There was an error while loading. Please reload this page.
feat(deposit): invert the conversion graphic for USDC deposits - #620
Merged
Conversation
The USDC deposit education screen, reached from Add Money -> Other Wallet, pointed its arrow the wrong way for a deposit and spelled the reserve as "USDF". Both this screen and WithdrawIntroScreen carried their own private copy of the same two-coins-and-an-arrow art, so promote it to FlipcashUI as ConversionGraphic, parameterised by which coin sits on each side, and have both call it. Mirrors the Android component of the same name. Copy drops the USDF branding. The "Deposit USDC" title stays as-is; the UI-test page object asserts on it.
The processing 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. A convert already carries its destination as targetMint, so the check costs nothing to thread through.
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 intro screen: the deposit side (Add Money → Other Wallet) pointed its arrow the wrong way and spelled the reserve as "USDF".
The graphic
USDCDepositEducationScreenandWithdrawIntroScreeneach carried their own private copy of the same two-coins-and-an-arrow art. Promoted toFlipcashUIasConversionGraphic, parameterised by which coin sits on each side:Same name and shape as the Android component, so the two stay diffable.
Copy for the deposit screen is now "Your USDC will be converted 1:1 to Dollars on Flipcash", with the accessibility label updated to match. The "Deposit USDC" title is deliberately unchanged —
FlipcashUITests/Support/Screens/USDCDepositEducationScreen.swiftasserts on it.Art is Figma node 9216:19798.
The "of X" suffix
Separate commit. The processing 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:AddMoneyProcessingViewModelreturns the bare formatted amount.ConvertFlowDestinationViewalready passes the destination astargetMint, so this is awhereclause ahead of the shared branch, nothing new threaded through. Its doc comment claimed it was analytics-only, which is no longer true.Every other swap keeps its suffix.
The sell path also lands in the reserve and still reads "of USDF", but it's unreachable —
onSelllives only in the v1LoadedContentbranch ofCurrencyInfoScreen, which #619 deletes along with the wholeCurrencySell*group. Collapsing that branch (and the then-deadSwapType.sell) is stacked on #619 rather than done here.No test for the convert title:
displayStateandexchangedFiatareprivate(set)and only reachable by drivingstartPollingagainst a live client, so it isn't callable fromFlipcashTestswithout a wider refactor.Android parity
code-payments/code-android-app#1300 mirrors both changes.