Harden MM pool flow and frontend guards
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 1m3s
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 1m3s
This commit is contained in:
@@ -366,6 +366,7 @@ function getPoolChartsData (callback) {
|
||||
**/
|
||||
function getUserChartsData (address, paymentsData, callback) {
|
||||
let stats = {};
|
||||
let userChartsConfig = config.charts && config.charts.user ? config.charts.user : {};
|
||||
let chartsFuncs = {
|
||||
hashrate: function (callback) {
|
||||
getUserHashrateChartData(address, function (data) {
|
||||
@@ -378,7 +379,8 @@ function getUserChartsData (address, paymentsData, callback) {
|
||||
}
|
||||
};
|
||||
for (let chartName in chartsFuncs) {
|
||||
if (!config.charts.user[chartName].enabled) {
|
||||
let chartConfig = userChartsConfig[chartName];
|
||||
if (chartConfig && chartConfig.enabled === false) {
|
||||
delete chartsFuncs[chartName];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user