Files
ObsidianDragon/src/ui/windows/balance_address_list.h
DanS 975743f754 feat(wallet): persist history and surface pending sends
Add an encrypted SQLite transaction history cache with cached tip metadata and
per-address shielded scan progress so startup and full refreshes avoid
re-scanning every z-address while still invalidating on wallet/address/rescan
changes.

Improve wallet history loading by paging transparent transactions, preserving
cached shielded and sent rows, keeping recent/unconfirmed activity visible, and
classifying mining-address receives. Show z_sendmany opid sends immediately in
History and Overview, pin pending rows through refreshes, and apply optimistic
address/balance debits until opids resolve.

Add timestamped RPC console tracing by source/method without logging params or
results, reduce redundant refresh/RPC calls, and cache Explorer recent block
summaries in SQLite.

Expand focused tests for transaction cache encryption, scan-progress
persistence/invalidation, history preservation, operation-status parsing,
pending send visibility, and Explorer/RPC refresh behavior.
2026-05-05 03:22:14 -05:00

68 lines
1.9 KiB
C++

#pragma once
#include "data/wallet_state.h"
#include <string>
#include <vector>
namespace dragonx {
namespace ui {
struct AddressListInput {
const AddressInfo* info = nullptr;
bool isZ = false;
bool hidden = false;
bool favorite = false;
bool mining = false;
std::string label;
std::string icon;
int sortOrder = -1;
};
struct AddressListRow {
const AddressInfo* info = nullptr;
bool isZ = false;
bool hidden = false;
bool favorite = false;
bool mining = false;
std::string label;
std::string icon;
int sortOrder = -1;
};
struct AddressRowRect {
float x = 0.0f;
float y = 0.0f;
float width = 0.0f;
float height = 0.0f;
};
struct AddressRowLayout {
float contentStartX = 0.0f;
float contentStartY = 0.0f;
float labelX = 0.0f;
float contentRight = 0.0f;
float buttonSize = 0.0f;
AddressRowRect favoriteButton;
AddressRowRect visibilityButton;
};
bool AddressListMatchesFilter(const AddressListInput& input, const std::string& filter);
std::vector<AddressListRow> BuildAddressListRows(const std::vector<AddressListInput>& inputs,
const std::string& filter,
bool hideZeroBalances,
bool showHidden);
AddressRowLayout ComputeAddressRowLayout(float rowX,
float rowY,
float rowWidth,
float rowHeight,
float rowPadLeft,
float rowIconSize,
float spacingMd,
float spacingSm,
float spacingXs);
std::string FormatAddressUsdValue(double balance, double priceUsd);
} // namespace ui
} // namespace dragonx