fix(ui): consistent hashrate units, full-address tooltips, drop dead vars
- Balance card hashrate now uses the shared FormatHashrate() (TH/GH/MH/KH/H) instead of a bespoke two-tier KH/s formatter. - Recent-tx rows show the full untruncated address on hover — two z-addresses can truncate to the same first/last window — and the truncate helpers guard maxLen<=3. - Remove the unused viewTop/viewBot "viewport culling" locals in the tx list (pagination already bounds per-frame work). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -46,7 +46,7 @@ std::string timeAgo(int64_t timestamp)
|
||||
|
||||
std::string truncateAddress(const std::string& address, int maxLen)
|
||||
{
|
||||
if (address.length() <= static_cast<size_t>(maxLen)) return address;
|
||||
if (maxLen <= 3 || address.length() <= static_cast<size_t>(maxLen)) return address;
|
||||
int half = (maxLen - 3) / 2;
|
||||
return address.substr(0, half) + "..." + address.substr(address.length() - half);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user