Hide transaction controls and reset pagination when no transactions are found

This commit is contained in:
void-57 2025-08-10 07:37:31 +05:30
parent aec3cf0a5b
commit b5689c7069

View File

@ -1545,6 +1545,19 @@ async function checkBalanceAndTransactions() {
if (allTransactions.length === 0) { if (allTransactions.length === 0) {
document.getElementById("txList").innerHTML = document.getElementById("txList").innerHTML =
'<div class="no-transactions"><i class="fas fa-inbox"></i><p>No transactions found for this address.</p></div>'; '<div class="no-transactions"><i class="fas fa-inbox"></i><p>No transactions found for this address.</p></div>';
// Hide transaction controls and reset pagination
document.getElementById("transactionControls").style.display = "none";
// Reset pagination info
document.getElementById("paginationInfo").textContent = "Showing 0 - 0 of 0 transactions";
// Clear page numbers
document.getElementById("pageNumbers").innerHTML = "";
// Disable pagination buttons
document.getElementById("prevBtn").disabled = true;
document.getElementById("nextBtn").disabled = true;
} else { } else {
// Show controls and display transactions // Show controls and display transactions
document.getElementById("transactionControls").style.display = document.getElementById("transactionControls").style.display =