feat(lite): lite wallet foundation (inherited working-tree state)
Preserve the previously-uncommitted lite wallet implementation and related dev WIP under version control: - src/wallet/ lite services: client bridge, bridge runtime, connection, lifecycle, sync, gateway, result parsers, state mapper, artifact contract/resolver, refresh services, UI adapters, wallet_backend/capabilities. (Includes two small M1 fixes: lifecycle walletReady now parses the response; default chain name -> "main".) - src/chat/ chat protocol; tests/fixtures/ (lite + hushchat); tools/hushchat_fixture_check.cpp; scripts/build-lite-backend-artifact.sh. - Pre-existing modified app_network/security/wizard, network_refresh_service, sidebar, mining_tab, bootstrap dialog, and version headers captured as-is. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "schema/ui_schema.h"
|
||||
#include "../embedded/IconsMaterialDesign.h"
|
||||
#include "../util/i18n.h"
|
||||
#include "../wallet/wallet_capabilities.h"
|
||||
#include <cstdio>
|
||||
#include <cmath>
|
||||
|
||||
@@ -66,14 +67,26 @@ inline const char* NavSectionLabel(const NavItem& item) {
|
||||
return item.section_tr_key ? TR(item.section_tr_key) : item.section_label;
|
||||
}
|
||||
|
||||
inline wallet::WalletUiSurface NavPageSurface(NavPage page)
|
||||
{
|
||||
switch (page) {
|
||||
case NavPage::Overview: return wallet::WalletUiSurface::Overview;
|
||||
case NavPage::Send: return wallet::WalletUiSurface::Send;
|
||||
case NavPage::Receive: return wallet::WalletUiSurface::Receive;
|
||||
case NavPage::History: return wallet::WalletUiSurface::History;
|
||||
case NavPage::Mining: return wallet::WalletUiSurface::Mining;
|
||||
case NavPage::Market: return wallet::WalletUiSurface::Market;
|
||||
case NavPage::Console: return wallet::WalletUiSurface::Console;
|
||||
case NavPage::Peers: return wallet::WalletUiSurface::Peers;
|
||||
case NavPage::Explorer: return wallet::WalletUiSurface::Explorer;
|
||||
case NavPage::Settings: return wallet::WalletUiSurface::Settings;
|
||||
default: return wallet::WalletUiSurface::Overview;
|
||||
}
|
||||
}
|
||||
|
||||
inline bool IsNavPageVisible(NavPage page)
|
||||
{
|
||||
#if DRAGONX_LITE_BUILD
|
||||
return page != NavPage::Console && page != NavPage::Peers && page != NavPage::Explorer;
|
||||
#else
|
||||
(void)page;
|
||||
return true;
|
||||
#endif
|
||||
return wallet::isUiSurfaceAvailable(wallet::currentWalletCapabilities(), NavPageSurface(page));
|
||||
}
|
||||
|
||||
// Get the Material Design icon string for a navigation page.
|
||||
|
||||
Reference in New Issue
Block a user