Skip to content

Commit

Permalink
fix: Correct validation for assets scopes (#3039)
Browse files Browse the repository at this point in the history
Fixes a typo in the validation for `endowment:assets`, that accidentally
expected a nested array of scopes.

---------

Co-authored-by: Maarten Zuidhoorn <[email protected]>
  • Loading branch information
FrederikBolding and Mrtenz authored Jan 27, 2025
1 parent b9066f7 commit b1f366f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/snaps-utils/src/manifest/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,7 @@ export const EmptyObjectStruct = object<EmptyObject>({}) as unknown as Struct<
/* eslint-disable @typescript-eslint/naming-convention */
export const PermissionsStruct: Describe<InitialPermissions> = type({
'endowment:assets': optional(
mergeStructs(
HandlerCaveatsStruct,
object({ scopes: size(array(ChainIdsStruct), 1, Infinity) }),
),
mergeStructs(HandlerCaveatsStruct, object({ scopes: ChainIdsStruct })),
),
'endowment:cronjob': optional(
mergeStructs(
Expand Down

0 comments on commit b1f366f

Please sign in to comment.