Skip to content

Commit

Permalink
remove sendAsync deprecation comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rekmarks committed Apr 21, 2020
1 parent ab76bf1 commit e5ae678
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions src/MetamaskInpageProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ module.exports = class MetamaskInpageProvider extends SafeEventEmitter {
experimentalMethods: false,
isConnected: false,
send: false,
// sendAsync: false,
// events
events: {
chainIdChanged: false,
Expand Down Expand Up @@ -257,6 +256,16 @@ module.exports = class MetamaskInpageProvider extends SafeEventEmitter {
})
}

/**
* Submit a JSON-RPC request object and a callback to make an RPC method call.
*
* @param {Object} payload - The RPC request object.
* @param {Function} callback - The callback function.
*/
sendAsync (payload, cb) {
this._rpcRequest(payload, cb)
}

/**
* We override the following event methods so that we can warn consumers
* about deprecated events:
Expand Down Expand Up @@ -563,21 +572,6 @@ module.exports = class MetamaskInpageProvider extends SafeEventEmitter {
return this._sendSync(methodOrPayload)
}

/**
* Submit a JSON-RPC request object and a callback to make an RPC method call.
*
* @param {Object} payload - The RPC request object.
* @param {Function} callback - The callback function.
*/
sendAsync (payload, cb) {

// if (!this._state.sentWarnings.sendAsync) {
// log.warn(messages.warnings.sendAsyncDeprecation)
// this._state.sentWarnings.sendAsync = true
// }
this._rpcRequest(payload, cb)
}

/**
* DEPRECATED
* Internal backwards compatibility method, used in send.
Expand Down

0 comments on commit e5ae678

Please sign in to comment.