From 24e8469cae2801e5ddcab39440d6008cbd2bfe03 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Thu, 11 Dec 2025 06:34:58 -0800 Subject: [PATCH] fix: remove useless/misleading toast in topup dialog (#7375) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes a toast that says "Purchase successful" when clicking the "Add credits" button -- that button just opens Stripe checkout in another tab, so the toast is misleading and could be wrong. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7375-fix-remove-useless-misleading-toast-in-topup-dialog-2c66d73d36508124bb65feaf7cf26712) by [Unito](https://www.unito.io) --------- Co-authored-by: GitHub Action --- .../content/TopUpCreditsDialogContent.vue | 21 ++----------------- src/locales/en/main.json | 2 -- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/components/dialog/content/TopUpCreditsDialogContent.vue b/src/components/dialog/content/TopUpCreditsDialogContent.vue index 70798e6b327..abbd9c4def6 100644 --- a/src/components/dialog/content/TopUpCreditsDialogContent.vue +++ b/src/components/dialog/content/TopUpCreditsDialogContent.vue @@ -122,11 +122,7 @@ import { useToast } from 'primevue/usetoast' import { computed, ref } from 'vue' import { useI18n } from 'vue-i18n' -import { - creditsToUsd, - formatCredits, - formatUsd -} from '@/base/credits/comfyCredits' +import { creditsToUsd } from '@/base/credits/comfyCredits' import UserCredit from '@/components/common/UserCredit.vue' import { useFirebaseAuthActions } from '@/composables/auth/useFirebaseAuthActions' import { useFeatureFlags } from '@/composables/useFeatureFlags' @@ -156,7 +152,7 @@ const { formattedRenewalDate } = useSubscription() // Use feature flag to determine design - defaults to true (new design) const useNewDesign = computed(() => flags.subscriptionTiersEnabled) -const { t, locale } = useI18n() +const { t } = useI18n() const authActions = useFirebaseAuthActions() const telemetry = useTelemetry() const toast = useToast() @@ -191,19 +187,6 @@ const handleBuy = async () => { const usdAmount = creditsToUsd(selectedCredits.value) telemetry?.trackApiCreditTopupButtonPurchaseClicked(usdAmount) await authActions.purchaseCredits(usdAmount) - - toast.add({ - severity: 'success', - summary: t('credits.topUp.purchaseSuccess'), - detail: t('credits.topUp.purchaseSuccessDetail', { - credits: formatCredits({ - value: selectedCredits.value, - locale: locale.value - }), - amount: `$${formatUsd({ value: usdAmount, locale: locale.value })}` - }), - life: 3000 - }) } catch (error) { console.error('Purchase failed:', error) diff --git a/src/locales/en/main.json b/src/locales/en/main.json index d6da3c24281..49b5e4255fc 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -1843,8 +1843,6 @@ "videosEstimate": "~{count} videos*", "templateNote": "*Generated with Wan Fun Control template", "buy": "Buy", - "purchaseSuccess": "Purchase Successful", - "purchaseSuccessDetail": "Successfully purchased {credits} credits for {amount}", "purchaseError": "Purchase Failed", "purchaseErrorDetail": "Failed to purchase credits: {error}", "unknownError": "An unknown error occurred"