Skip to content

Add Subscription smart contract playground - #449

Open
jin-Pi wants to merge 1 commit into
pi-apps:mainfrom
jin-Pi:subscription-smart-contract-playground
Open

Add Subscription smart contract playground#449
jin-Pi wants to merge 1 commit into
pi-apps:mainfrom
jin-Pi:subscription-smart-contract-playground

Conversation

@jin-Pi

@jin-Pi jin-Pi commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • Replaces the Order Apple/Lemon Pie payment demo on the Shop page with a SubscriptionPanel UI for exercising window.Pi.SmartContract.Subscription methods (registerService, subscribe, process, getSubscription, getSubscriptionReservation, getSubscriberSubscriptions, etc.)
  • Adds corresponding SmartContract.Subscription type declarations to window.d.ts
  • Note: frontend/index.html currently points the Pi SDK to http://localhost:9000/v2-production.js (SDK v3.0) instead of the CDN — a local dev override left in intentionally per author's request, should be reviewed before merge
  • usePayments.ts retains commented-out debug experiments used while building the panel — also left as-is per author's request

Test plan

  • Restore SDK src to CDN (or confirm intentional) before merging
  • Open Shop page inside Pi Browser and verify SubscriptionPanel renders and each action calls through to window.Pi.SmartContract.Subscription
  • Clean up leftover debug code in usePayments.ts if not needed

🤖 Generated with Claude Code

Replaces the Order Apple/Lemon Pie payment demo on the Shop page with a
SubscriptionPanel UI for exercising window.Pi.SmartContract.Subscription
methods (registerService, subscribe, process, getSubscription, etc.).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant