diff --git a/app/scripts/controllers/permissions/permissionsMethodMiddleware.js b/app/scripts/controllers/permissions/permissionsMethodMiddleware.js index de9009f13..2a2485e33 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 48937faf2..6c977f272 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, },