@@ -16,10 +16,9 @@ const DELEGATION_PRIMARY_TYPE = 'Delegation';
16
16
* Accepts either a pre-parsed typed data object or a JSON string. If a string is
17
17
* provided, it is parsed. Returns true when the `primaryType` is "Delegation".
18
18
*
19
- * @param params - Wrapper object for parameters .
20
- * @param params.data - EIP-712 typed data object or its JSON string representation.
19
+ * @param data - EIP-712 typed data object or its JSON string representation .
20
+ *
21
21
* @returns True if the typed message is a Delegation request; otherwise false.
22
- * @throws {Error } If the `data` argument is a string that cannot be parsed as valid JSON.
23
22
*/
24
23
export function isDelegationRequest ( data : MessageParamsTypedData ) : boolean {
25
24
const { primaryType } = data ;
@@ -35,9 +34,10 @@ export function isDelegationRequest(data: MessageParamsTypedData): boolean {
35
34
* context to the permissions controller via the supplied messenger.
36
35
*
37
36
* @param params - Wrapper object for parameters.
38
- * @param params.messageParams - The typed message parameters to decode.
39
37
* @param params.messenger - Messenger used to call the permissions controller.
40
38
* @param params.origin - The origin of the request.
39
+ * @param params.data - The typed data to decode.
40
+ *
41
41
* @returns A decoded permission, or `undefined` if no permission can be derived.
42
42
* @throws {Error } If required metadata (origin or justification) is missing or invalid.
43
43
*/
@@ -70,7 +70,7 @@ export function decodePermissionFromRequest({
70
70
)
71
71
)
72
72
) {
73
- return ;
73
+ return undefined ;
74
74
}
75
75
76
76
const decodedPermission = messenger . call (
0 commit comments