File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
packages/snaps-execution-environments/src/common Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 44 UserInputEventStruct ,
55} from '@metamask/snaps-sdk' ;
66import { ChainIdStruct , HandlerType } from '@metamask/snaps-utils' ;
7- import type { Infer } from '@metamask/superstruct' ;
7+ import type { Infer , Struct } from '@metamask/superstruct' ;
88import {
99 any ,
1010 array ,
@@ -20,9 +20,15 @@ import {
2020 tuple ,
2121 union ,
2222} from '@metamask/superstruct' ;
23- import type { Json , JsonRpcSuccess } from '@metamask/utils' ;
23+ import type {
24+ CaipChainId ,
25+ Json ,
26+ JsonRpcRequest ,
27+ JsonRpcSuccess ,
28+ } from '@metamask/utils' ;
2429import {
2530 assertStruct ,
31+ CaipChainIdStruct ,
2632 JsonRpcIdStruct ,
2733 JsonRpcParamsStruct ,
2834 JsonRpcRequestStruct ,
@@ -245,9 +251,9 @@ export function assertIsOnUserInputRequestArguments(
245251}
246252
247253export const OnProtocolRequestArgumentsStruct = object ( {
248- scope : ChainIdStruct ,
254+ scope : CaipChainIdStruct ,
249255 request : JsonRpcRequestStruct ,
250- } ) ;
256+ } ) as unknown as Struct < { scope : CaipChainId ; request : JsonRpcRequest } , null > ;
251257
252258export type OnProtocolRequestArguments = Infer <
253259 typeof OnProtocolRequestArgumentsStruct
You can’t perform that action at this time.
0 commit comments