Skip to content

Commit 5124eda

Browse files
committed
Updated insight link
1 parent 0fe5415 commit 5124eda

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

server.js

+3-15
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,7 @@ var initialization = async function() {
7979
path: '/api/richlist',
8080
handler: function(request, reply)
8181
{
82-
return new Promise(function(accept, reject) {
83-
var LIMIT = request.query.limit;
84-
LIMIT = LIMIT > 0 && LIMIT <= 10000 ? LIMIT : 100;
85-
query("SELECT * FROM bth_addresses WHERE 1 ORDER BY balance DESC LIMIT " + LIMIT, {}, function(err, results, fields) {
86-
if (err) accept({richlist:[]});
87-
else {
88-
let richlist = results.map(function(result) {
89-
return {address:result.address, balance:result.balance}
90-
});
91-
accept({richlist:richlist});
92-
}
93-
});
94-
});
82+
return {richlist: []};
9583
}
9684
});
9785

@@ -101,7 +89,7 @@ var initialization = async function() {
10189
handler: function(request, reply)
10290
{
10391
return new Promise(function(accept, reject) {
104-
got("http://insight.bithereum.network/insight-api/status").then(function(response) {
92+
got("http://insight-explorer.bithereum.network/insight-api/status").then(function(response) {
10593
try {
10694
var data = JSON.parse(response.body);
10795
accept(data.info.circulating);
@@ -120,7 +108,7 @@ var initialization = async function() {
120108
handler: function(request, reply)
121109
{
122110
return new Promise(function(accept, reject) {
123-
got("http://insight2.bithereum.network/insight-api/status").then(function(response) {
111+
got("http://insight-explorer.bithereum.network/insight-api/status").then(function(response) {
124112
accept(response.body);
125113
});
126114
});

0 commit comments

Comments
 (0)