Skip to content

Commit 354b572

Browse files
authored
fix: use correct method names for background event snap in test-snaps (#3411)
We had the wrong method names in the click handlers for background-events in test-snaps.
1 parent c99e664 commit 354b572

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

packages/test-snaps/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Use correct method names in click handlers for background events example Snap ([#3411](https://https://github.com/MetaMask/snaps/pull/3411))
13+
1014
## [2.23.0]
1115

1216
### Added

packages/test-snaps/src/features/snaps/background-events/components/CancelBackgroundEvent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const CancelBackgroundEvent: FunctionComponent = () => {
2222
event.preventDefault();
2323
invokeSnap({
2424
snapId: getSnapId(BACKGROUND_EVENTS_SNAP_ID, BACKGROUND_EVENTS_SNAP_PORT),
25-
method: 'cancelNotification',
25+
method: 'cancelDialog',
2626
params: {
2727
id,
2828
},

packages/test-snaps/src/features/snaps/background-events/components/ScheduleBackgroundEvent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const ScheduleBackgroundEvent: FunctionComponent = () => {
2828
event.preventDefault();
2929
invokeSnap({
3030
snapId: getSnapId(BACKGROUND_EVENTS_SNAP_ID, BACKGROUND_EVENTS_SNAP_PORT),
31-
method: 'scheduleNotificationWithDate',
31+
method: 'scheduleDialogWithDate',
3232
params: {
3333
date,
3434
},
@@ -39,7 +39,7 @@ export const ScheduleBackgroundEvent: FunctionComponent = () => {
3939
event.preventDefault();
4040
invokeSnap({
4141
snapId: getSnapId(BACKGROUND_EVENTS_SNAP_ID, BACKGROUND_EVENTS_SNAP_PORT),
42-
method: 'scheduleNotificationWithDuration',
42+
method: 'scheduleDialogWithDuration',
4343
params: {
4444
duration,
4545
},

0 commit comments

Comments
 (0)