1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 20:39:08 +01:00
metamask-extension/app
Mark Stacey 9e2e353a24
Define global web3 as non-enumerable (#8634)
We inject `web3` globally on most websites. This has been breaking
websites that attempted to serialize the `window` object, because any
attempt to access certain `web3` properties (such as `web3.eth.mining`)
would throw an error. This is because `web3` defined a getter for these
properties that would call `.send([method])`, which doesn't work for
most methods.

An example of a site that this breaks is `Storybook`, when the
`@storybook/addon-actions` addon is being used. When using storybook
with this addon and with the MetaMask extension installed, actions
would not be properly dispatched because an error would be thrown in
the attempt to serialize the event (which includes a reference to the
`window`).

The `web3` global we inject is now defined as non-enumerable, so it
will be skipped automatically in any attempt to serialize the `window`
object.
2020-05-20 20:18:25 -07:00
..
_locales Design QA fixes for v8 (#8630) 2020-05-20 15:42:18 -05:00
fonts Use @fortawesome/fontawesome-free npm package (#8256) 2020-03-30 20:05:51 -03:00
images Design QA fixes for v8 (#8630) 2020-05-20 15:42:18 -05:00
manifest
scripts Define global web3 as non-enumerable (#8634) 2020-05-20 20:18:25 -07:00
vendor/trezor
home.html
loading.html
notification.html Fix connection modal style issues (#8433) 2020-05-04 12:04:41 -03:00
phishing.html Use main style bundle for phishing page (#8255) 2020-03-30 19:44:46 -03:00
popup.html
trezor-usb-permissions.html
unsupport.html