Skip to content

Commit

Permalink
wallet_ -> metamask_
Browse files Browse the repository at this point in the history
  • Loading branch information
rekmarks committed Dec 1, 2020
1 parent b5f30cb commit 2fe974d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/MetaMaskInpageProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ module.exports = class MetaMaskInpageProvider extends SafeEventEmitter {
jsonRpcConnection.events.on('notification', (payload) => {
const { method, params, result } = payload

if (method === 'wallet_accountsChanged') {
if (method === 'metamask_accountsChanged') {
this._handleAccountsChanged(result)

} else if (method === 'wallet_unlockStateChanged') {
} else if (method === 'metamask_unlockStateChanged') {
this._handleUnlockStateChanged(result)
} else if (method === 'wallet_chainChanged') {
} else if (method === 'metamask_chainChanged') {
this._handleChainChanged(result)
} else if (EMITTED_NOTIFICATIONS.includes(method)) {
this.emit('notification', payload) // deprecated
Expand Down Expand Up @@ -304,14 +304,14 @@ module.exports = class MetaMaskInpageProvider extends SafeEventEmitter {

/**
* Constructor helper.
* Populates initial state by calling 'wallet_getProviderState' and
* Populates initial state by calling 'metamask_getProviderState' and
* 'eth_accounts', and emits necessary events.
*
* @private
*/
_initializeState () {
Promise.all([
this.request({ method: 'wallet_getProviderState' }),
this.request({ method: 'metamask_getProviderState' }),
this.request({ method: 'eth_accounts' }),
])
.then(([state, accounts]) => {
Expand Down
2 changes: 1 addition & 1 deletion src/siteMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function sendSiteMetadata (engine, log) {
// call engine.handle directly to avoid normal RPC request handling
engine.handle(
{
method: 'wallet_sendDomainMetadata',
method: 'metamask_sendDomainMetadata',
domainMetadata,
},
NOOP,
Expand Down

0 comments on commit 2fe974d

Please sign in to comment.