Remove legacy child-pool merge mining layer
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 36s
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 36s
This commit is contained in:
@@ -79,37 +79,17 @@ mergedStats = {};
|
||||
let mergedApis = {};
|
||||
|
||||
$(function() {
|
||||
|
||||
|
||||
let merged_apis = $.ajax({
|
||||
url: `${api}/get_apis`,
|
||||
dataType: 'json',
|
||||
cache: 'false'
|
||||
})
|
||||
|
||||
let poolStats = $.ajax({
|
||||
url: `${api}/stats`,
|
||||
dataType: 'json',
|
||||
cache: 'false'
|
||||
})
|
||||
|
||||
Promise.all([poolStats, merged_apis])
|
||||
Promise.all([poolStats])
|
||||
.then(values => {
|
||||
lastStats = values[0]
|
||||
mergedApis = values[1]
|
||||
let subs = [];
|
||||
Object.keys(mergedApis).some(key => {
|
||||
let apiUrl = `${mergedApis[key].api}/stats`
|
||||
subs.push($.ajax({url: apiUrl, dataType: 'json', cache: 'false'}))
|
||||
})
|
||||
Promise.all(subs)
|
||||
.then(data => {
|
||||
data.forEach(item => {
|
||||
mergedStats[item.config.coin] = item
|
||||
})
|
||||
$('#poolVersion').html(lastStats.config.version);
|
||||
routePage();
|
||||
})
|
||||
$('#poolVersion').html(lastStats.config.version);
|
||||
routePage();
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user