Skip to content

Commit

Permalink
Allow maxRequestTime on endowment:rpc (#2291)
Browse files Browse the repository at this point in the history
When implementing `maxRequestTime`, validation support for the property
on `endowment:rpc` in the manifest was left out accidentally. This would
cause problems when devs try to use `maxRequestTime` with the endowment
permission. This PR fixes that by making the endowment use similar
validation to the other handler endowments.

Fixes #2290
  • Loading branch information
FrederikBolding authored Mar 20, 2024
1 parent 618ac1f commit 081b0f7
Showing 1 changed file with 1 addition and 1 deletion.
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 @@ -199,7 +199,7 @@ export const PermissionsStruct = type({
),
'endowment:network-access': optional(object({})),
'endowment:page-home': optional(HandlerCaveatsStruct),
'endowment:rpc': optional(RpcOriginsStruct),
'endowment:rpc': optional(assign(HandlerCaveatsStruct, RpcOriginsStruct)),
'endowment:signature-insight': optional(
assign(
HandlerCaveatsStruct,
Expand Down

0 comments on commit 081b0f7

Please sign in to comment.