New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@metamask/inpage-provider

Package Overview
Dependencies
Maintainers
5
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask/inpage-provider - npm Package Compare versions

Comparing version 5.2.1 to 6.0.0

22

CHANGELOG.md

@@ -10,2 +10,22 @@ # Changelog

## [6.0.0] - 2020-07-04
### 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
- 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.
## [5.2.1] - 2020-06-29
### Changed
- Un-deprecate `isConnected` method.
## [5.2.0] - 2020-06-24

@@ -33,3 +53,3 @@

- Reverted to pre-`4.0.0` state
- Stop protecting overwrites of the following properties, that existing pre-`4.0.0`:
- Stop protecting overwrites of the following properties, that existed prior to `4.0.0`:
- `ethereum.isMetaMask`

@@ -36,0 +56,0 @@ - `ethereum._metamask`

2

package.json
{
"name": "@metamask/inpage-provider",
"version": "5.2.1",
"version": "6.0.0",
"description": "A JavaScript Ethereum provider that connects over a WebExtension port.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -59,2 +59,3 @@ const pump = require('pump')

close: false,
data: false,
networkChanged: false,

@@ -172,10 +173,20 @@ notification: false,

jsonRpcConnection.events.on('notification', (payload) => {
if (payload.method === 'wallet_accountsChanged') {
this._handleAccountsChanged(payload.result)
} else if (EMITTED_NOTIFICATIONS.includes(payload.method)) {
this.emit('notification', payload) // deprecated
this.emit('data', payload) // deprecated
const { method, params, result } = payload
if (method === 'wallet_accountsChanged') {
this._handleAccountsChanged(result)
} else if (EMITTED_NOTIFICATIONS.includes(method)) {
this.emit('message', {
type: payload.method,
data: payload.params,
type: method,
data: params,
})
// deprecated
if (params) {
this.emit('notification', params.result)
}
}

@@ -182,0 +193,0 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc