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 { try {
const transaction = await transactionUtils.$getTransactionExtended(txIds[i], true, true); const transaction = await transactionUtils.$getTransactionExtended(txIds[i], true, true);
transactions.push(transaction); 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) { } catch (e) {
logger.debug('getBlockTransactions error: ' + (e instanceof Error ? e.message : e)); logger.debug('getBlockTransactions error: ' + (e instanceof Error ? e.message : e));
} }