From b5689c7069198f5ef01894be500c7399db2c5f9a Mon Sep 17 00:00:00 2001 From: void-57 Date: Sun, 10 Aug 2025 07:37:31 +0530 Subject: [PATCH] Hide transaction controls and reset pagination when no transactions are found --- scripts/wallet.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/wallet.js b/scripts/wallet.js index 987679a..6cc967b 100644 --- a/scripts/wallet.js +++ b/scripts/wallet.js @@ -1545,6 +1545,19 @@ async function checkBalanceAndTransactions() { if (allTransactions.length === 0) { document.getElementById("txList").innerHTML = '

No transactions found for this address.

'; + + // 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(); -}); +}); \ No newline at end of file