Skip to content

feat: add reloadWithUnlockResultNotification to WalletV1 interface #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 30, 2025

Conversation

oladayo21
Copy link
Contributor

@oladayo21 oladayo21 commented Jul 29, 2025

Summary

  • Add new method to WalletV1 interface for unlock notifications
  • Enables wallet implementations to trigger page reload with notifications

Test plan

  • Build succeeds with new interface
  • Type checking passes in consuming projects

Related PRs

Notes

This is part of the credit unlock notification feature implementation across multiple projects.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a new method reloadWithUnlockResultNotification to the WalletV1 interface to support credit unlock notifications. This enables wallet implementations to trigger page reloads with notification data when credits are used to unlock content.

  • Introduces UnlockNotificationResult type to represent unlock operation outcomes
  • Extends WalletV1 interface with the new notification method
  • Uses inline type definition to avoid namespace pollution
Comments suppressed due to low confidence (1)

src/ps-web-apis.ts:308

  • [nitpick] The method name 'reloadWithUnlockResultNotification' is inconsistent with the type parameter name 'unlockResult' vs the type name 'UnlockNotificationResult'. Consider renaming the parameter to 'unlockNotification' to match the type name, or use 'unlockResult' consistently in the type name.
    reloadWithUnlockResultNotification: (unlockResult: UnlockNotificationResult) => void;

@oladayo21 oladayo21 requested review from mkai and Luca-Esposito July 29, 2025 12:08
@oladayo21 oladayo21 changed the title feat: add reloadWithUnlockNotification to WalletV1 interface feat: add reloadWithUnlockResultNotification to WalletV1 interface Jul 29, 2025
- Added completeUnlockFlow method for better naming clarity
- Renamed UnlockNotificationResult to UnlockFlowResult
- Added comprehensive JSDoc documentation
- Types are kept internal to avoid namespace issues
@oladayo21 oladayo21 merged commit b6d47d6 into master Jul 30, 2025
5 checks passed
@oladayo21 oladayo21 deleted the PLUS-3109 branch July 30, 2025 05:27
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.

3 participants