From 185e5c73661326fc306f9ffb31ff95b20589cbb8 Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Mon, 31 Aug 2026 11:05:23 -0400 Subject: [PATCH] fix(chat): stop naming the reserve in the cash preview A cash message preview appended the token name whenever the message carried one, so a Dollars transfer read "You sent $1.00 of Dollars". USDF is branded "Dollars", and the formatted amount already carries the dollar sign, so the suffix repeats the unit it just printed. The reserve mint now resolves to an empty name, which drops the preview to the bare amount. Every other token still gets named, since "$1.00 of Waylon" is the only thing that says which currency moved. Same rule the swap processing screen applies through `isConvertingToDollars`. --- .../com/flipcash/shared/chat/ui/ChatSummaryMapping.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/flipcash/shared/chat-ui/src/main/kotlin/com/flipcash/shared/chat/ui/ChatSummaryMapping.kt b/apps/flipcash/shared/chat-ui/src/main/kotlin/com/flipcash/shared/chat/ui/ChatSummaryMapping.kt index 46c1ec822..dea5b0a82 100644 --- a/apps/flipcash/shared/chat-ui/src/main/kotlin/com/flipcash/shared/chat/ui/ChatSummaryMapping.kt +++ b/apps/flipcash/shared/chat-ui/src/main/kotlin/com/flipcash/shared/chat/ui/ChatSummaryMapping.kt @@ -58,7 +58,13 @@ private fun ChatSummary.formatPreview( } is MessageContent.Cash -> { val formatted = content.amount.formatted() - val name = content.tokenName.ifBlank { tokensByMint[content.mint]?.name.orEmpty() } + // The reserve is branded "Dollars", so naming it reads as "$1.00 of Dollars" — + // the amount alone already says it. Every other token still gets named. + val name = if (content.mint == Mint.usdf) { + "" + } else { + content.tokenName.ifBlank { tokensByMint[content.mint]?.name.orEmpty() } + } val label = if (name.isNotBlank()) { resources.getString(R.string.label_chat_preview_cash_suffix, formatted, name) } else {