Skip to content

Commit 51cf34f

Browse files
authored
Merge pull request sebs#15 from morrislaptop/patch-1
Don't pass full URL in again as it is already set
2 parents b2c25fd + 9d040a4 commit 51cf34f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/init.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
var restify = require('restify-clients');
33
const querystring = require('querystring');
44

5-
const url = 'https://api.etherscan.io/api';
5+
const url = 'https://api.etherscan.io';
66
const testUrls = {
77
// old default defaults to rinkeb
8-
'ropsten': 'https://ropsten.etherscan.io/api',
9-
'kovan': 'https://kovan.etherscan.io/api',
10-
'rinkeby': 'https://rinkeby.etherscan.io/api'
8+
'ropsten': 'https://ropsten.etherscan.io',
9+
'kovan': 'https://kovan.etherscan.io',
10+
'rinkeby': 'https://rinkeby.etherscan.io'
1111
};
1212

1313
/**
@@ -42,7 +42,7 @@ module.exports = function (apiKey, chain) {
4242

4343
function getRequest(query) {
4444
var p = new Promise(function(resolve, reject) {
45-
client.get(url+'?'+query, function(err, req, res, data) {
45+
client.get('/api?'+query, function(err, req, res, data) {
4646
if (err) {
4747
return reject(err);
4848
}

0 commit comments

Comments
 (0)