Skip to content

Commit

Permalink
temporary fix for batchRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
hxc20060903 committed Dec 4, 2019
1 parent 8a3b5a7 commit 5bec49e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/web3-providers/src/providers/MetamaskProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ export default class MetamaskProvider extends AbstractSocketProvider {
* @returns {Promise<any>}
*/
sendPayload(payload) {
if (Array.isArray(payload)) {
return this.connection._metamask.sendBatch(payload);
}
return new Promise((resolve, reject) => {
this.connection.send(payload, (error, response) => {
if (!error) {
Expand Down

0 comments on commit 5bec49e

Please sign in to comment.