Merge pull request #2 from void-57/main

Hide transaction controls and reset pagination when no transactions a…
This commit is contained in:
Aniruddha 2025-08-10 07:38:55 +05:30 committed by GitHub
commit e2668657e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1545,6 +1545,19 @@ async function checkBalanceAndTransactions() {
if (allTransactions.length === 0) {
document.getElementById("txList").innerHTML =
'<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 {
// Show controls and display transactions
document.getElementById("transactionControls").style.display =
@ -2134,4 +2147,4 @@ window.copyCurrentAddress = copyCurrentAddress;
document.addEventListener("DOMContentLoaded", () => {
initializeInputControls();
});
});