Skip to content

Commit

Permalink
Restore data provider event
Browse files Browse the repository at this point in the history
This event is deprecated, and is not part of EIP-1193. However we did
not plan to remove this; it was removed accidentally as part of #109.
It should now behave exactly as it did in v6.
  • Loading branch information
Gudahtt committed Jan 20, 2021
1 parent 2280088 commit 4a280bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/MetaMaskInpageProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ export default class MetaMaskInpageProvider extends SafeEventEmitter {
} else if (method === 'metamask_chainChanged') {
this._handleChainChanged(params);
} else if (EMITTED_NOTIFICATIONS.includes(method)) {
// deprecated
this.emit('data', payload);

this.emit('message', {
type: method,
data: params,
Expand Down

0 comments on commit 4a280bb

Please sign in to comment.