-
Notifications
You must be signed in to change notification settings - Fork 564
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds a new feature: background events, per [SIP-28](https://github.com/MetaMask/SIPs/blob/main/SIPS/sip-28.md). A summary of the changes made: 1. The `CronjobController` was updated to now include logic for handling and storing background events. 2. `snap_scheduleBackgroundEvent` RPC method was added to schedule an event. 3. `snap_cancelBackgroundEvent` RPC method was added to cancel an event. 4. `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).
- Loading branch information
Showing
35 changed files
with
2,353 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* The parameters for calling the `scheduleNotification` JSON-RPC method. | ||
* | ||
* @property date - The ISO 8601 date of when the notification should be scheduled. | ||
*/ | ||
export type ScheduleNotificationParams = { | ||
date: string; | ||
}; | ||
|
||
/** | ||
* The parameters for calling the `cancelNotification` JSON-RPC method. | ||
* | ||
* @property id - The id of the notification event to cancel. | ||
*/ | ||
export type CancelNotificationParams = { | ||
id: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"branches": 92.96, | ||
"functions": 96.71, | ||
"lines": 98.01, | ||
"statements": 97.71 | ||
"branches": 93.06, | ||
"functions": 96.54, | ||
"lines": 98.02, | ||
"statements": 97.74 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.