Skip to content

Releases: MetaMask/providers

8.0.4

04 Feb 15:44
8bd829d
Compare
Choose a tag to compare

Fixed

  • Fix warning on second currentProvider access (#138)

8.0.3

20 Jan 18:03
12c3d84
Compare
Choose a tag to compare

Fixed

  • Restore 'data' provider event (#135)

8.0.2

12 Jan 20:13
2280088
Compare
Choose a tag to compare

Changed

  • Reduce window.web3 shim console noise (#133)

8.0.1

12 Jan 20:13
58d1d28
Compare
Choose a tag to compare

Fixed

  • Fix 8.0.0 types (#127)

8.0.0

08 Dec 00:45
8143162
Compare
Choose a tag to compare

Added

  • Add logger parameter to initializeProvider (#116)
  • Add window.web3 shim, shimWeb3 export (#113, #115)
    • This is to maintain window.web3.currentProvider once MetaMask stops injecting window.web3 (very soon), and to log attempts to access any properties on the shim other than currentProvider.
    • initializeWeb3 now has a shouldShimWeb3 argument, which causes the shim to be set as window.web3 if true.

Changed

  • (BREAKING) Rename initProvider export to initializeProvider (#114)
  • (BREAKING) Replace ethereum.publicConfigStore with new set of JSON-RPC notifications (#109)

Fixed

  • Correctly implement connect and disconnect 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 a code property with a number value. There are currently two codes:
      • 1013 indicates that MetaMask is attempting to reestablish the connection
      • 1011 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, and networkChanged.
    • This prevents sites that handle any of these events by reloading the page from entering into a reload loop.

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 at window.web3, and kept web3.eth.defaultAccount in sync with ethereum.selectedAddress.
    • This functionality is replicated in @metamask/legacy-web3.

7.0.0

08 Dec 00:01
ac7f092
Compare
Choose a tag to compare
  • (BREAKING) Changed casing of Metamask in all exports to MetaMask
    • A brand is a brand ¯\(ツ)

6.3.0

08 Dec 00:02
83d9cf0
Compare
Choose a tag to compare
  • ethereum.chainId and .networkVersion now default to null instead of undefined
  • Improved JSDoc comments and tags

6.0.0

08 Dec 00:03
e4c35f3
Compare
Choose a tag to compare

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.

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.

Implement new EIP-1193 API

22 Apr 16:50
4a85035
Compare
Choose a tag to compare

Added

  • The most recent EIP 1193 API (#30)
    • The method request
    • The events disconnect and message
  • 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 a connectionStream and an
    options object (#31)
  • BREAKING: _metamask.sendBatch -> _metamask.requestBatch (#30)
  • BREAKING: Revert send to match provider in v7.7.8 of metamask-extension (#29)
  • The connect event now emits with a ProviderConnectInfo object per EIP 1193 (#30)
  • Deprecated the send method (#30)
  • Deprecated the events close, networkChanged, and notification, and
    added deprecation warnings for them (#30)
  • Un-deprecated sendAsync (#29)

Fix faulty null checks

12 Feb 18:34
5807e89
Compare
Choose a tag to compare
  • Fix faulty null checks
  • Update package(s)