@@ -51,6 +51,10 @@ module.exports = function (apiKey, chain) {
51
51
return reject ( data . message ) ;
52
52
}
53
53
54
+ if ( data . error ) {
55
+ return reject ( data . error . message ) ;
56
+ }
57
+
54
58
resolve ( data ) ;
55
59
} ) ;
56
60
} ) ;
@@ -198,11 +202,11 @@ module.exports = function (apiKey, chain) {
198
202
* var res = api.proxy.eth_getTransactionByHash('0x1e2910a262b1008d0616a0beb24c1a491d78771baa54a33e66065e03b1f46bc1');
199
203
* @returns {Promise.<object> }
200
204
*/
201
- eth_getTransactionByHash ( hash ) {
205
+ eth_getTransactionByHash ( txhash ) {
202
206
const module = 'proxy' ;
203
207
const action = 'eth_getTransactionByHash' ;
204
208
var query = querystring . stringify ( {
205
- module, action, apiKey, hash
209
+ module, action, apiKey, txhash
206
210
} ) ;
207
211
return getRequest ( query ) ;
208
212
} ,
@@ -494,7 +498,7 @@ module.exports = function (apiKey, chain) {
494
498
* var supply = api.account.tokenbalance(
495
499
* '0x4366ddc115d8cf213c564da36e64c8ebaa30cdbd',
496
500
* 'DGD',
497
- * ''
501
+ * ''
498
502
* );
499
503
* @returns {Promise.<object> }
500
504
*/
@@ -519,7 +523,7 @@ module.exports = function (apiKey, chain) {
519
523
if ( address ) {
520
524
queryObject . address = address ;
521
525
}
522
-
526
+
523
527
var query = querystring . stringify ( queryObject ) ;
524
528
return getRequest ( query ) ;
525
529
} ,
0 commit comments