// DragonX Wallet - ImGui Edition // Copyright 2024-2026 The Hush Developers // Released under the GPLv3 #pragma once #include #include #include #include namespace dragonx { class App; namespace ui { /** * @brief Snapshot of what the History tab currently shows, for "export current filter". * * `indices` are positions into WalletState::transactions of every leg currently visible (a merged * autoshield row contributes both its send and receive legs), sorted ascending. Published only when the * filtered list is (re)built, so it reflects the last state the History tab rendered. `txRevision` lets a * consumer reject a snapshot that predates the current tx list. */ struct TxFilterSnapshot { bool valid = false; bool active = false; // a type filter and/or search text is applied std::uint64_t txRevision = 0; std::string description; // human label of the active filter std::vector indices; }; /// The latest History-tab filter snapshot (see TxFilterSnapshot). const TxFilterSnapshot& GetTransactionsFilterSnapshot(); /** * @brief Render the Transactions tab * Shows transaction history */ void RenderTransactionsTab(App* app); /** * @brief Pre-filter the Transactions (History) tab by an address. * * Sets the History search box to @p address and resets the type filter to All on the next * render, then the caller navigates to the History tab. Used by the "View transactions" * actions in Contacts, the Balance address list, and the Receive tab. Because shielded / * received-from attribution is incomplete, this shows transactions *involving* the address, * not a guaranteed-complete set. */ void SetTransactionsAddressFilter(const std::string& address); } // namespace ui } // namespace dragonx