- Add refresh scheduler and network refresh service boundaries for typed refresh results, ordered RPC collectors, applicators, and price parsing. - Add daemon lifecycle and wallet security workflow helpers while preserving App-owned command RPC, decrypt, cancellation, and UI handoff behavior. - Split balance, console, mining, amount formatting, and async task logic into focused modules with expanded Phase 4 test coverage. - Fix market price loading by triggering price refresh immediately, avoiding queue-pressure drops, tracking loading/error state, and adding translations. - Polish send, explorer, peers, settings, theme/schema, and related tab UI. - Replace checked-in generated language headers with build-generated resources. - Document the cleanup audit, UI static-state guidance, and architecture updates.
37 lines
887 B
C++
37 lines
887 B
C++
#include "mining_pool_panel.h"
|
|
|
|
#include <algorithm>
|
|
|
|
namespace dragonx {
|
|
namespace ui {
|
|
|
|
bool shouldDefaultPoolWorker(const std::string& currentWorker, bool alreadyDefaulted)
|
|
{
|
|
return !alreadyDefaulted && (currentWorker.empty() || currentWorker == "x");
|
|
}
|
|
|
|
std::string defaultPoolWorkerAddress(const std::vector<AddressInfo>& addresses)
|
|
{
|
|
for (const auto& addr : addresses) {
|
|
if (addr.type == "shielded" && !addr.address.empty()) {
|
|
return addr.address;
|
|
}
|
|
}
|
|
return {};
|
|
}
|
|
|
|
bool miningValueAlreadySaved(const std::vector<std::string>& savedValues,
|
|
const std::string& value)
|
|
{
|
|
if (value.empty()) return false;
|
|
return std::find(savedValues.begin(), savedValues.end(), value) != savedValues.end();
|
|
}
|
|
|
|
const char* defaultPoolUrl()
|
|
{
|
|
return "pool.dragonx.is:3433";
|
|
}
|
|
|
|
} // namespace ui
|
|
} // namespace dragonx
|