Skip to content

fix: align empty restore-purchases message with expected copy - #879

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
walexjnr:fix/restore-purchases-empty-message-834
Jul 25, 2026
Merged

fix: align empty restore-purchases message with expected copy#879
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
walexjnr:fix/restore-purchases-empty-message-834

Conversation

@walexjnr

Copy link
Copy Markdown
Contributor

closes #834

Overview

Ensures the "Restore Purchases" flow behaves per the acceptance criteria.

While reviewing, the restore button is already connected: both SubscriptionManager and PaymentHistory call restorePurchases() from useInAppPurchase, which invokes mobilePayments.restorePurchases(), refreshes the subscription tier (so restored items unlock immediately), refreshes history, and surfaces the result in an alert.

The one detail not matching the acceptance criteria was the empty-restore copy. This aligns it:

  • src/hooks/useInAppPurchase.ts: empty restore now returns "No purchases found to restore." (was "No previous purchases found for this account."), which both the paywall and payment-history restore buttons display.

Acceptance criteria

  • Restore Purchases button calls the real API ✅ (already wired)
  • Restored items unlock immediately after restore ✅ (tier + history refresh in the hook)
  • Empty restore shows "No purchases found to restore" ✅ (this change)

Per the requested scope, I did not run tests or a build locally.

The Restore Purchases button is already wired through useInAppPurchase to
mobilePayments.restorePurchases() (it restores the tier and refreshes history).
Align the empty-restore message with the expected 'No purchases found to
restore.' copy.
@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for the contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit 5884086 into rinafcode:main Jul 25, 2026
1 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] mobilePayments.ts restore purchases flow not wired to UI

2 participants