-
Notifications
You must be signed in to change notification settings - Fork 564
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
Feat: Add background events #2941
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2941 +/- ##
==========================================
+ Coverage 94.59% 94.71% +0.11%
==========================================
Files 494 497 +3
Lines 10656 10802 +146
Branches 1635 1649 +14
==========================================
+ Hits 10080 10231 +151
+ Misses 576 571 -5 ☔ View full report in Codecov by Sentry. |
packages/snaps-rpc-methods/src/permitted/scheduleBackgroundEvent.ts
Outdated
Show resolved
Hide resolved
packages/snaps-rpc-methods/src/permitted/scheduleBackground.test.ts
Outdated
Show resolved
Hide resolved
packages/snaps-controllers/src/cronjob/CronjobController.test.ts
Outdated
Show resolved
Hide resolved
packages/snaps-rpc-methods/src/permitted/scheduleBackgroundEvent.ts
Outdated
Show resolved
Hide resolved
packages/snaps-rpc-methods/src/permitted/scheduleBackgroundEvent.ts
Outdated
Show resolved
Hide resolved
packages/snaps-rpc-methods/src/permitted/scheduleBackgroundEvent.ts
Outdated
Show resolved
Hide resolved
packages/snaps-rpc-methods/src/permitted/scheduleBackgroundEvent.ts
Outdated
Show resolved
Hide resolved
LGTM once @Mrtenz approves it as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple more nits.
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
This PR adds a new feature: background events, per SIP-28. A summary of the changes made:
CronjobController
was updated to now include logic for handling and storing background events.snap_scheduleBackgroundEvent
RPC method was added to schedule an event.snap_cancelBackgroundEvent
RPC method was added to cancel an event.snap_getBackgroundEvents
RPC method was added to get a snap's background events (not outlined in the SIP, but will be added as an addendum soon).