Progressbar calculation fix

This commit is contained in:
softsimon 2022-05-20 21:50:01 +04:00
parent a9fb94a811
commit 7e1a6e65d5

View File

@ -780,7 +780,7 @@ class Routes {
try {
const transaction = await transactionUtils.$getTransactionExtended(txIds[i], true, true);
transactions.push(transaction);
loadingIndicators.setProgress('blocktxs-' + req.params.hash, (i + 1) / endIndex * 100);
loadingIndicators.setProgress('blocktxs-' + req.params.hash, (i - startingIndex + 1) / (endIndex - startingIndex) * 100);
} catch (e) {
logger.debug('getBlockTransactions error: ' + (e instanceof Error ? e.message : e));
}