Repository navigation
Conversation
A period-end cancel leaves the membership active, so Pro Hub showed Active with no alert and Membership said Renews on. Get card also revealed the accounts menu, and a deactivated plan hid member pricing. Co-authored-by: Cursor <cursoragent@cursor.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
Smart E2E Test SelectionSelected E2E tags: ALL AI Confidence: 100 E2E reasoningExpand to readI kept the seed's ALL selection. The Wallet home view (app/components/Views/Wallet/index.tsx) now mounts usePrefetchMoneyAccountPlusSubscriptions on every render of the home screen. That hook calls the shared useSubscriptions query, which now sets a staleTime and refetchOnMount and removes cached queries when the session locks or signs out. The new prefetch is gated by the Pro subscription feature flag, so the blast radius is probably limited. But the Wallet home is the entry point for nearly every smoke flow, and useSubscriptions is also used by useMoneyAccountPlusAccess. Other changes (ProHub, ProSubscription, the subscription selectors, which now use shared status helpers, and en.json) are mostly additive or refactors, so they add little extra risk. Because the Wallet root view and a global hook changed, broad coverage is the conservative choice. |
The accounts menu showed Join for a member, then switched after Pro Hub loaded. The row now shows a skeleton until the check settles, then the matching label. Co-authored-by: Cursor <cursoragent@cursor.com>
The membership screen no longer renders that row, so the test was checking a label that is not on the screen. Co-authored-by: Cursor <cursoragent@cursor.com>
A period-end cancel is still an active membership, so the Renew action opened the subscription screen and bounced straight back. Co-authored-by: Cursor <cursoragent@cursor.com>
Entitlement-only users (Subscriber access without a membership) were sent to Pro Hub, which immediately navigated back. Gate the Orange row on hasMembership, and send settled entitlement-only users to Benefits. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
AccessibilityQuick a11y notes on the new Orange loading path and member-pricing skeletons:
Nice that Resume already announces in-progress/errors and the banner error uses An AI accessibility agent posted this. If this is wrong, reply here. |
Co-authored-by: Cursor <cursoragent@cursor.com>
| return UNAVAILABLE_MODEL; | ||
| } | ||
|
|
||
| if (canResumeMembership(subscription)) { |
There was a problem hiding this comment.
A plan with a payment problem shows as Active.
The new check runs first and only asks "is cancel-at-period-end set, and is the period end still in the future?" It never looks at the status. A past-due, paused, or unpaid plan in that window is labeled Active, and the alert offers Resume instead of add funds. The same input also hides the "renewal failed" alert on an active plan whose latest invoice failed, and the add-funds alert on a plan waiting for funds. Membership uses that same check for the date row, so it says Ends on too.
I think we should check subscription statuses first.
| // entitlement, including before the list loads, so it is not enough to open | ||
| // the hub. An empty result waits until that query settles, then joins. | ||
| const isMember = hasMembership; | ||
| const isKnownNonMember = |
There was a problem hiding this comment.
Join shows while the subscriptions request is still running.
"Eligible" is treated as a finished non-member, with no check that the request has settled. In React Query 5, isLoading is true only when there is no data yet and a request is running. A refetch already has data, so isLoading is false, access stays Eligible, and isSubscriptionsSettled is false. The row says Join MetaMask Orange and opens the join flow. That happens for the whole refetch, including the five-minute refresh, whenever the controller does not yet hold a membership.
Same in useMoneyAccountPlusAccess.ts
| const menuItems: { | ||
| iconName: IconName; | ||
| label: string; | ||
| label: React.ReactNode; |
There was a problem hiding this comment.
The drawer row still has the loading-skeleton API.
The skeleton was removed. Every row still passes a string, and no row sets accessibilityLabel or isDisabled. The extra props and the ReactNode label are unused.
There was a problem hiding this comment.
Contact support is gone, but its handler is still there
…ctive toast mUSD through MetaMask Pay was treated as a still-funding top-up, so checkout skipped the success screen. On-ramp and card payments still show the processing toaster, and the root watcher now shows the active-membership toaster once after it. Co-authored-by: Cursor <cursoragent@cursor.com>
A past-due, paused, unpaid, or awaiting-funds plan was labeled Active because cancel-at-period-end was checked first. Join also stayed visible during a subscriptions refetch, and the removed Contact support handler and drawer skeleton props were still in place. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d8b6428. Configure here.
…me promise A payment problem hid Resume, and the date row followed that action, so a plan still set to end said Renews on. Resume already handles its own failure, so the banner no longer leaves that promise floating. Co-authored-by: Cursor <cursoragent@cursor.com>
PatrykLucka
left a comment
There was a problem hiding this comment.
Requesting changes as payment failure can remain stuck behind the processing toast if every processing checkout does not observe provisional before awaiting_funds (1st issue below):
- Medium — Direct
awaiting_fundscheckout is not fully monitored
resolveProSubscriptionStartOutcomereturnsProcessingfor an external-funds checkout inawaitingFunds, butuseProSubscriptionPaymentMonitoronly armsawaitingFundsafter observingprovisional.
A directawaiting_funds → canceledtransition can leave the processing toast/debt active without opening the failure sheet. Please use one checkout-session marker for the Processing outcome and add tests for directawaitingFunds → canceledandawaitingFunds → active. - Medium — Some Pro Hub states can leave member pricing on an endless skeleton
awaitingFundsandpastDueroute to Pro Hub, but without an entitlement they can resolve toEligible.useMoneyAccountPlusBenefitsthen returnsLoadingbefore reaching itsEmptybranch.
Please derive a single benefits mode from subscription status/access and add tests forawaitingFundsandpastDuewithout entitlements. - Medium — Paused/unpaid benefits cache is not scoped to the subscription period
The service-backed query key contains only the subscription status. If the subscription ID or billing period changes while the status remainspausedorunpaid, the previous usage snapshot can be reused while Pro Hub remains mounted.
Please include subscription/period identifiers in the query key or explicitly invalidate/refetch when they change. - Low — Home prefetch can still refetch when a menu opens
useSubscriptionshas no explicitstaleTimeorrefetchOnMountpolicy. React Query can therefore treat the Home-prefetched result as stale when Accounts Menu or Profile Drawer mounts, causing another request and temporarily hiding the non-member row.
Please define the freshness policy explicitly and add a query-client test for Home prefetch followed by menu opening.
A broader simplification would be to centralize subscription status/session resolution and reuse it across checkout monitoring, Pro Hub access, benefits rendering, and Orange-entry routing.
- Add a shared Money Account Plus status module used by selectors, checkout monitoring, Pro Hub, the banner, and benefits. - Add one entry resolver (hub, join, pending, disabled) shared by the Orange row, Pro Hub, and the subscription screen. - Watch a processing checkout that lands directly on awaiting_funds, so a later cancel opens the failed sheet and activation shows the toast once. - Derive member pricing from subscription status, so past_due and awaiting_funds without an entitlement show Empty instead of a skeleton. - Scope the benefits query to subscription id and period end, so a new paused period does not reuse old usage. - Keep the subscriptions result fresh for one refetch interval, so opening a menu after the Home prefetch does not refetch; drop it on lock or sign-out. Co-authored-by: Cursor <cursoragent@cursor.com>
…-cancel Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # app/components/Views/SocialProfile/ProfileDrawer/ProfileDrawer.test.tsx
|
| shouldShowNewPrivacyToast, | ||
| storePrivacyPolicyClickedOrClosed, | ||
| }: WalletProps) => { | ||
| // Fills SubscriptionController before the accounts menu or profile drawer |
There was a problem hiding this comment.
Before this PR, only the accounts menu, Pro Hub and the subscription screen mounted the subscriptions query, which polls every 5 minutes (refetchInterval). Now Home mounts it too.
Home stay open for every user so i think we should make the fetching interval of this one more infrequent
| enabled: enabled && isSignedIn && isUnlocked, | ||
| enabled: enabled && isSessionActive, | ||
| staleTime: SUBSCRIPTIONS_REFETCH_INTERVAL, | ||
| refetchOnMount: true, |
There was a problem hiding this comment.
Nit: this is already the default




Description
Pro Hub, checkout, and the Orange menu each decided membership status on their own. A scheduled cancel, a payment problem, and a checkout that was still moving funds could show the wrong label, the wrong next step, or a flicker.
Scheduled cancel
activewithcancelAtPeriodEnd. Pro Hub keeps the Active label and shows the cancelled alert while resume is still available.Member pricing
Orange menu
Checkout
Plus status groups live in one module, used by the selectors, the banner, resume, checkout, and member pricing.
Jira Link:
https://consensyssoftware.atlassian.net/browse/SUB-1170
https://consensyssoftware.atlassian.net/browse/SUB-1177
Changelog
CHANGELOG entry: Fixed Pro Hub and the Orange menu so a scheduled cancel, a payment problem, and card or crypto checkout each show the right status and next step, and the menu label no longer flickers while membership loads
Related issues
Fixes:
Refs: SUB-1170
Manual testing steps
Screenshots/Recordings
Before
N/A
After
https://consensys.slack.com/archives/C0BCCKYRJH2/p1793946635763949?thread_ts=1793772178.180049&cid=C0BCCKYRJH2
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Touches subscription gating, payment toasts, and navigation across Orange, Pro Hub, and checkout; regressions could mis-route users or show wrong membership actions, but logic is heavily test-covered.
Overview
Unifies Money Account Plus behavior across Pro Hub, Orange menu, and subscription checkout by centralizing status helpers in
moneyAccountPlusStatusand routing viaresolveMoneyAccountPlusEntryso the accounts menu, Pro Hub, and Benefits screen agree on when to show the row, hub vs join, and pending states.Scheduled cancellation now keeps an Active label with a warning alert and Resume membership (uncancel in place) when the period end is still ahead and payment is healthy; payment problems block resume and keep their own alerts. Membership shows Ends on for pending period-end cancels, drops Contact support, and Get card navigates into the Home card stack so the accounts menu does not flash first.
Member pricing for paused/unpaid plans loads current-period usage from SubscriptionService with a paused disclaimer (not a fee waiver); past due/awaiting funds hide the section instead of spinning on skeletons.
Orange row stays hidden until membership is known; Wallet Home prefetches subscriptions with cache/stale-time handling so menus do not refetch or flicker Join vs member labels.
Checkout distinguishes crypto (success screen) from card/on-ramp (processing path) using top-up metadata; a session activation toast debt ties processing toasts to one active-membership toast and failure sheet behavior, including checkouts that start in
awaiting_funds.Navigation types add
CardScreensunder the main stack for nested card entry.Reviewed by Cursor Bugbot for commit 7bd4d7a. Bugbot is set up for automated code reviews on this repo. Configure here.