fix(subscription): preselect pay channel before navigation

This commit is contained in:
2026-07-02 11:38:47 +08:00
parent 35c8de917d
commit cd25fa35f2
15 changed files with 121 additions and 56 deletions
+5
View File
@@ -13,6 +13,7 @@ import {
recordExternalBrowserPromptShown,
resolveExternalBrowserPromptEligibility,
} from "@/lib/chat/chat_external_browser";
import { getDefaultPayChannelForCountryCode } from "@/lib/payment/default_pay_channel";
import { MobileShell } from "@/app/_components/core";
@@ -115,10 +116,14 @@ export function ChatScreen() {
}
function handleMessageLimitUnlock(): void {
const defaultPayChannel = getDefaultPayChannelForCountryCode(
userState.currentUser?.countryCode,
);
router.push(
getChatPaywallNavigationUrl(
authState.loginStatus,
getInsufficientCreditsSubscriptionType(userState.isVip),
defaultPayChannel,
),
);
}