mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
cb12cb8f5a
Support has been restored for Chromium v78. Previously the extension would crash upon startup. The main incompatibility was the use of ES2020 operators (the optional chain and nullish coalesce operators) in the libraries `@ethereumjs/util` and `superstruct`. This was resolved by transpiling those libraries. After fixing that, the extension no longer crashed but the UI refused to connect. This was because the UI process was not being identified as an internal process, because the code responsible for checking that was relying on the `origin` property of `MessageSender` [1] which wasn't added until Chromium v80. The check has been updated to use the `url` property instead, which existed in older versions of Chrome. Lastly, the content security policy was updated to include the default content security policy alongside the intended modification. Newer versions of Chrome will merge the configired CSP with the default, but older versions required it to be explicitly specified. This should not result in any functional change. [1]: https://developer.chrome.com/docs/extensions/reference/runtime/#type-MessageSender
9 lines
224 B
JSON
9 lines
224 B
JSON
{
|
|
"content_security_policy": "frame-ancestors 'none'; script-src 'self'; object-src 'self'",
|
|
"externally_connectable": {
|
|
"matches": ["https://metamask.io/*"],
|
|
"ids": ["*"]
|
|
},
|
|
"minimum_chrome_version": "66"
|
|
}
|