Skip to content

Commit

Permalink
fix: Make jobs property fully optional in the cronjob endowment
Browse files Browse the repository at this point in the history
  • Loading branch information
FrederikBolding committed Jan 10, 2025
1 parent 71ab7c3 commit 7525e12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/snaps-sdk/src/types/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export type RequestedSnap = {

export type InitialPermissions = Partial<{
'endowment:cronjob': {
jobs: Cronjob[];
jobs?: Cronjob[];
maxRequestTime?: number;
};
'endowment:ethereum-provider': EmptyObject;
Expand Down
2 changes: 1 addition & 1 deletion packages/snaps-utils/src/manifest/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export const PermissionsStruct: Describe<InitialPermissions> = type({
'endowment:cronjob': optional(
mergeStructs(
HandlerCaveatsStruct,
object({ jobs: CronjobSpecificationArrayStruct }),
object({ jobs: optional(CronjobSpecificationArrayStruct) }),
),
),
'endowment:ethereum-provider': optional(EmptyObjectStruct),
Expand Down

0 comments on commit 7525e12

Please sign in to comment.