mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-30 16:18:07 +01:00
9e2e353a24
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. |
||
---|---|---|
.. | ||
ens-ipfs | ||
migrator | ||
account-tracker.js | ||
auto-reload.js | ||
backend-metametrics.js | ||
buy-eth-url.js | ||
cleanErrorStack.js | ||
ComposableObservableStore.js | ||
createLoggerMiddleware.js | ||
createOnboardingMiddleware.js | ||
createOriginMiddleware.js | ||
createStreamSink.js | ||
createTabIdMiddleware.js | ||
decrypt-message-manager.js | ||
encryption-public-key-manager.js | ||
enums.js | ||
extractEthjsErrorMessage.js | ||
fetch-with-timeout.js | ||
freezeGlobals.js | ||
get-first-preferred-lang-code.js | ||
getObjStructure.js | ||
local-store.js | ||
message-manager.js | ||
network-store.js | ||
nodeify.js | ||
notification-manager.js | ||
personal-message-manager.js | ||
random-id.js | ||
reportFailedTxToSentry.js | ||
seed-phrase-verifier.js | ||
select-chain-id.js | ||
setupFetchDebugging.js | ||
setupSentry.js | ||
stream-utils.js | ||
typed-message-manager.js | ||
util.js |