fix mempool sync skeleton loaders on Core backend

This commit is contained in:
Mononaut 2023-07-24 17:49:34 +09:00
parent 2d463326e0
commit 36fe5627c7
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E

View File

@ -128,7 +128,7 @@ class Mempool {
} else {
done = true;
}
if (Math.floor(count / expectedCount) < 1) {
if (Math.floor((count / expectedCount) * 100) < 100) {
loadingIndicators.setProgress('mempool', count / expectedCount * 100);
}
} else {
@ -247,7 +247,9 @@ class Mempool {
} else {
const progress = (currentMempoolSize + newTransactions.length) / transactions.length * 100;
logger.debug(`Mempool is synchronizing. Processed ${newTransactions.length}/${diff} txs (${Math.round(progress)}%)`);
if (Math.floor(progress) < 100) {
loadingIndicators.setProgress('mempool', progress);
}
intervalTimer = Date.now()
}
}