Releases: MetaMask/providers
Releases · MetaMask/providers
8.0.4
8.0.3
8.0.2
8.0.1
8.0.0
Added
- Add
logger
parameter toinitializeProvider
(#116) - Add
window.web3
shim,shimWeb3
export (#113, #115)- This is to maintain
window.web3.currentProvider
once MetaMask stops injectingwindow.web3
(very soon), and to log attempts to access any properties on the shim other thancurrentProvider
. initializeWeb3
now has ashouldShimWeb3
argument, which causes the shim to be set aswindow.web3
iftrue
.
- This is to maintain
Changed
- (BREAKING) Rename
initProvider
export toinitializeProvider
(#114) - (BREAKING) Replace
ethereum.publicConfigStore
with new set of JSON-RPC notifications (#109)
Fixed
- Correctly implement
connect
anddisconnect
events (#120)- See EIP-1193 for the specification of these events.
disconnect
emits with an RPC error. Like all such errors emitted by this module, they have acode
property with anumber
value. There are currently two codes:1013
indicates that MetaMask is attempting to reestablish the connection1011
indicates that a page reload is required
- Send page metadata even if page is already loaded (#119)
- Convert
MetaMaskInpageProvider
logger
to instance variable (#118)- Previously, it was erroneously a singleton across all class instances.
- Stop emitting state change events on initialization (#117)
- Includes
accountsChanged
,chainChanged
, andnetworkChanged
. - This prevents sites that handle any of these events by reloading the page from entering into a reload loop.
- Includes
Removed
- (BREAKING) Remove
_metamask.isEnabled
and_metamask.isApproved
(#112) - (BREAKING) Remove the
chainIdChanged
event (#111) - (BREAKING) Remove
ethereum.publicConfigStore
(#109) - (BREAKING) Remove
web3.js
-related functionality (#106)- This functionality caused the page to reload if there was a
web3.js
instance atwindow.web3
, and keptweb3.eth.defaultAccount
in sync withethereum.selectedAddress
. - This functionality is replicated in @metamask/legacy-web3.
- This functionality caused the page to reload if there was a
7.0.0
6.3.0
6.0.0
Added
- The
data
event- This event was removed in
4.0.0
, as it was thought to only be used internally.
This assumption was incorrect, and the event is now restored.
- This event was removed in
Changed
- (BREAKING) Restore the
notification
event value to its pre-4.0.0
state- Prior to
4.0.0
this event was emitted by code in the MetaMask extension.
Its value was inadvertently changed when it was moved to this package.
- Prior to
Implement new EIP-1193 API
Added
- The most recent EIP 1193 API (#30)
- The method
request
- The events
disconnect
andmessage
- The method
- A global initialization event,
ethereum#initialized
, for
asynchronous injection (#31) - Helper methods for initializing the provider (#31)
Changed
- BREAKING: Use named instead of default exports (#31)
- BREAKING:
MetaMaskInpage
constructor now takes aconnectionStream
and an
options object (#31) - BREAKING:
_metamask.sendBatch
->_metamask.requestBatch
(#30) - BREAKING: Revert
send
to match provider in v7.7.8 ofmetamask-extension
(#29) - The
connect
event now emits with aProviderConnectInfo
object per EIP 1193 (#30) - Deprecated the
send
method (#30) - Deprecated the events
close
,networkChanged
, andnotification
, and
added deprecation warnings for them (#30) - Un-deprecated
sendAsync
(#29)
Fix faulty null checks
- Fix faulty null checks
- Update package(s)