diff --git a/app/scripts/controllers/permissions/permissionsMethodMiddleware.js b/app/scripts/controllers/permissions/permissionsMethodMiddleware.js index add23196e..a4bac3976 100644 --- a/app/scripts/controllers/permissions/permissionsMethodMiddleware.js +++ b/app/scripts/controllers/permissions/permissionsMethodMiddleware.js @@ -74,8 +74,8 @@ export default function createPermissionsMethodMiddleware({ // custom method for getting metadata from the requesting domain, // sent automatically by the inpage provider when it's initialized case 'metamask_sendDomainMetadata': { - if (typeof req.domainMetadata?.name === 'string') { - addDomainMetadata(req.origin, req.domainMetadata) + if (typeof req.params?.name === 'string') { + addDomainMetadata(req.origin, req.params) } res.result = true return diff --git a/test/unit/app/controllers/permissions/mocks.js b/test/unit/app/controllers/permissions/mocks.js index 05bed739d..be4a2321b 100644 --- a/test/unit/app/controllers/permissions/mocks.js +++ b/test/unit/app/controllers/permissions/mocks.js @@ -600,7 +600,7 @@ export const getters = deepFreeze({ return { origin, method: 'metamask_sendDomainMetadata', - domainMetadata: { + params: { ...args, name, },