mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix site metadata JSON-RPC handler (#10243)
* Fix getting the site metadata from the request origin params. Regressed from inpage-provider ts migration the request. The property domainMetadata is now set as a params key for the request. https://github.com/MetaMask/inpage-provider/blob/v7.0.0/src/siteMetadata.js#L19-L25 vs https://github.com/MetaMask/inpage-provider/blob/main/src/siteMetadata.ts#L19-L27 * Change hardcoded mocked response of the request to the prod response.
This commit is contained in:
parent
ae5ee105bf
commit
a88a087b60
@ -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
|
||||
|
@ -600,7 +600,7 @@ export const getters = deepFreeze({
|
||||
return {
|
||||
origin,
|
||||
method: 'metamask_sendDomainMetadata',
|
||||
domainMetadata: {
|
||||
params: {
|
||||
...args,
|
||||
name,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user