Skip to content

feat(#978): add key subscription status and content access gate - #1004

Open
whitezaddy wants to merge 2 commits into
accesslayerorg:devfrom
whitezaddy:feat/978-subscription-access-gate
Open

whitezaddy wants to merge 2 commits into
accesslayerorg:devfrom
whitezaddy:feat/978-subscription-access-gate

Conversation

@whitezaddy

Copy link
Copy Markdown

Summary

Closes #978

  • Implemented SubscriptionAccessGate component to gate content based on a user's wallet key holdings.
  • Integrated the access gate into CreatorDetailPage to wrap the exclusive content section.
  • Added comprehensive unit tests covering the unconnected, loading, locked, and unlocked states.
  • Ensured all tests, lints, and TypeScript builds pass perfectly.

Testing

  • pnpm lint
  • pnpm build

Checklist

@drips-wave

drips-wave Bot commented Sep 26, 2026

Copy link
Copy Markdown

@whitezaddy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Chucks1093

Copy link
Copy Markdown
Member

MC

Chucks1093 pushed a commit that referenced this pull request Sep 28, 2026
Adds a Liquidity tab to /profile (read-only on /profile/:wallet) showing
active LP positions, total LP earnings, and add / claim / remove controls.

- Reads positions and pool APR from the LP API specified in
  accesslayer-server #980 (GET /lp/positions, GET /lp/pool/:keyId).
- Submits add_liquidity / claim_lp_rewards / remove_liquidity on the
  Creator Keys contract (accesslayer-contracts #1002, PR #1004) through
  the existing Soroban Client + Signer pattern used by governance votes.
- Validates add-liquidity amounts against spendable XLM read from the
  account ledger entry (net of reserve and selling liabilities), and
  re-validates against a fresh balance right before signing.
- Pool share uses exact integer math, floored to 0.01%. All amounts are
  bigint stroops end to end.
- Claim is simulated first and never prompts the wallet for a zero
  payout. Removal is blocked with a live countdown while locked, and the
  lock is re-checked from fresh data before signing.
- Success is only reported once getTransaction returns SUCCESS; an
  on-chain FAILED is surfaced as an error.
- Earnings total is de-duplicated by lpId and withheld when any
  position's rewards are unavailable.

Documented in docs/LpPositionManagement.md, including the expected API
shape and the known limitations (no lock in the current contract, XLM
assumed as the pool asset).

Co-Authored-By: Claude Opus 5.5 (1M context) <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.

Add key subscription status and content access gate on creator pages

2 participants