1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-01 13:47:06 +01:00
metamask-extension/.yarn/patches/eth-query-npm-2.1.2-7c6adc825f.patch
Brad Decker 6d1170f06c
upgrade yarn to version 3 (#16232)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: ricky <ricky.miller@gmail.com>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: legobt <6wbvkn0j@anonaddy.me>
Co-authored-by: Pedro Figueiredo <pedro.figueiredo@consensys.net>
2022-12-08 10:38:04 -06:00

28 lines
1.0 KiB
Diff

diff --git a/index.js b/index.js
index 13e9f3c25e7d3bee6a4ec3c2c5e1eea31e86a377..18b050ded27baf3603708fd6d595a554ea3c19c8 100644
--- a/index.js
+++ b/index.js
@@ -1,9 +1,9 @@
const extend = require('xtend')
const createRandomId = require('json-rpc-random-id')()
+const debug = require('debug')('eth-query')
module.exports = EthQuery
-
function EthQuery(provider){
const self = this
self.currentProvider = provider
@@ -63,7 +63,10 @@ EthQuery.prototype.submitHashrate = generateFnFor('eth_subm
EthQuery.prototype.sendAsync = function(opts, cb){
const self = this
- self.currentProvider.sendAsync(createPayload(opts), function(err, response){
+ const payload = createPayload(opts)
+ debug('making request %o', payload)
+ self.currentProvider.sendAsync(payload, function(err, response){
+ debug('got err = %o, response = %o', err, response)
if (!err && response.error) err = new Error('EthQuery - RPC Error - '+response.error.message)
if (err) return cb(err)
cb(null, response.result)