Progressbar calculation fix

This commit is contained in:
softsimon 2022-05-20 21:50:01 +04:00
parent dabfa05337
commit 521418bd25
No known key found for this signature in database
GPG key ID: 488D7DCFB5A430D7

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));
}