From a677c09984bcdbf8b2f398b3b909893b1aa3d936 Mon Sep 17 00:00:00 2001 From: DanS Date: Fri, 5 Jun 2026 12:40:26 -0500 Subject: [PATCH] refactor(lite): drop 4 unused OOP wrapper classes over free functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each of these classes wrapped an existing free function with a one-line delegating method and was never instantiated anywhere (verified: no references outside their own translation unit, not even within their own .cpp beyond the definition) — the redundant "wrapper layer" pattern CLAUDE.md warns against: - LiteWalletLifecycleUiExecutionAdapter -> executeLiteWalletLifecycleUiRequest - LiteWalletServerSelectionUiExecutionAdapter -> executeLiteWalletServerSelectionUi - LiteWalletServerLifecycleReadinessPlanner -> evaluateLiteWalletServerLifecycleReadiness - LiteBackendActivationReadinessAdapter -> evaluateLiteBackendActivationReadiness The live free functions (the actual entry points used by the UI/runtime) are unchanged. Both targets build, test suite passes, source-hygiene clean. Co-Authored-By: Claude Opus 4.8 --- src/wallet/lite_backend_artifact_resolver.cpp | 12 ------------ src/wallet/lite_backend_artifact_resolver.h | 10 ---------- src/wallet/lite_wallet_lifecycle_ui_adapter.cpp | 12 ------------ src/wallet/lite_wallet_lifecycle_ui_adapter.h | 11 ----------- .../lite_wallet_server_lifecycle_readiness.cpp | 12 ------------ src/wallet/lite_wallet_server_lifecycle_readiness.h | 12 ------------ src/wallet/lite_wallet_server_selection_adapter.cpp | 12 ------------ src/wallet/lite_wallet_server_selection_adapter.h | 11 ----------- 8 files changed, 92 deletions(-) diff --git a/src/wallet/lite_backend_artifact_resolver.cpp b/src/wallet/lite_backend_artifact_resolver.cpp index 05f4f6f..271aff0 100644 --- a/src/wallet/lite_backend_artifact_resolver.cpp +++ b/src/wallet/lite_backend_artifact_resolver.cpp @@ -910,16 +910,4 @@ LiteBackendArtifactResolverResult LiteBackendArtifactResolver::resolve( return evaluateLiteBackendArtifactResolver(input, options_); } -LiteBackendActivationReadinessAdapter::LiteBackendActivationReadinessAdapter( - LiteBackendActivationReadinessOptions options) - : options_(options) -{ -} - -LiteBackendActivationReadinessResult LiteBackendActivationReadinessAdapter::evaluate( - const LiteBackendActivationReadinessInput& input) const -{ - return evaluateLiteBackendActivationReadiness(input, options_); -} - } // namespace dragonx::wallet diff --git a/src/wallet/lite_backend_artifact_resolver.h b/src/wallet/lite_backend_artifact_resolver.h index caf5589..9063950 100644 --- a/src/wallet/lite_backend_artifact_resolver.h +++ b/src/wallet/lite_backend_artifact_resolver.h @@ -431,14 +431,4 @@ private: LiteBackendArtifactResolverOptions options_; }; -class LiteBackendActivationReadinessAdapter { -public: - explicit LiteBackendActivationReadinessAdapter(LiteBackendActivationReadinessOptions options = {}); - - LiteBackendActivationReadinessResult evaluate(const LiteBackendActivationReadinessInput& input) const; - -private: - LiteBackendActivationReadinessOptions options_; -}; - } // namespace dragonx::wallet diff --git a/src/wallet/lite_wallet_lifecycle_ui_adapter.cpp b/src/wallet/lite_wallet_lifecycle_ui_adapter.cpp index 3306f88..9fec5fb 100644 --- a/src/wallet/lite_wallet_lifecycle_ui_adapter.cpp +++ b/src/wallet/lite_wallet_lifecycle_ui_adapter.cpp @@ -424,17 +424,5 @@ LiteWalletLifecycleUiExecutionResult executeLiteWalletLifecycleUiRequest( return result; } -LiteWalletLifecycleUiExecutionAdapter::LiteWalletLifecycleUiExecutionAdapter( - config::Settings& settings) - : settings_(settings) -{ -} - -LiteWalletLifecycleUiExecutionResult LiteWalletLifecycleUiExecutionAdapter::execute( - const LiteWalletLifecycleUiExecutionInput& input) const -{ - return executeLiteWalletLifecycleUiRequest(settings_, input); -} - } // namespace wallet } // namespace dragonx \ No newline at end of file diff --git a/src/wallet/lite_wallet_lifecycle_ui_adapter.h b/src/wallet/lite_wallet_lifecycle_ui_adapter.h index c43fc2a..166e5fa 100644 --- a/src/wallet/lite_wallet_lifecycle_ui_adapter.h +++ b/src/wallet/lite_wallet_lifecycle_ui_adapter.h @@ -131,16 +131,5 @@ LiteWalletLifecycleUiExecutionResult executeLiteWalletLifecycleUiRequest( config::Settings& settings, const LiteWalletLifecycleUiExecutionInput& input); -class LiteWalletLifecycleUiExecutionAdapter { -public: - explicit LiteWalletLifecycleUiExecutionAdapter(config::Settings& settings); - - LiteWalletLifecycleUiExecutionResult execute( - const LiteWalletLifecycleUiExecutionInput& input) const; - -private: - config::Settings& settings_; -}; - } // namespace wallet } // namespace dragonx \ No newline at end of file diff --git a/src/wallet/lite_wallet_server_lifecycle_readiness.cpp b/src/wallet/lite_wallet_server_lifecycle_readiness.cpp index 695a36f..81c0334 100644 --- a/src/wallet/lite_wallet_server_lifecycle_readiness.cpp +++ b/src/wallet/lite_wallet_server_lifecycle_readiness.cpp @@ -383,16 +383,4 @@ LiteWalletServerLifecycleReadinessResult evaluateLiteWalletServerLifecycleReadin return result; } -LiteWalletServerLifecycleReadinessPlanner::LiteWalletServerLifecycleReadinessPlanner( - LiteWalletServerLifecycleReadinessOptions options) - : options_(options) -{ -} - -LiteWalletServerLifecycleReadinessResult LiteWalletServerLifecycleReadinessPlanner::evaluate( - const LiteWalletServerLifecycleReadinessInput& input) const -{ - return evaluateLiteWalletServerLifecycleReadiness(input, options_); -} - } // namespace dragonx::wallet \ No newline at end of file diff --git a/src/wallet/lite_wallet_server_lifecycle_readiness.h b/src/wallet/lite_wallet_server_lifecycle_readiness.h index 690b4b6..7ed8936 100644 --- a/src/wallet/lite_wallet_server_lifecycle_readiness.h +++ b/src/wallet/lite_wallet_server_lifecycle_readiness.h @@ -178,16 +178,4 @@ LiteWalletServerLifecycleReadinessResult evaluateLiteWalletServerLifecycleReadin const LiteWalletServerLifecycleReadinessInput& input, LiteWalletServerLifecycleReadinessOptions options = {}); -class LiteWalletServerLifecycleReadinessPlanner { -public: - explicit LiteWalletServerLifecycleReadinessPlanner( - LiteWalletServerLifecycleReadinessOptions options = {}); - - LiteWalletServerLifecycleReadinessResult evaluate( - const LiteWalletServerLifecycleReadinessInput& input) const; - -private: - LiteWalletServerLifecycleReadinessOptions options_; -}; - } // namespace dragonx::wallet \ No newline at end of file diff --git a/src/wallet/lite_wallet_server_selection_adapter.cpp b/src/wallet/lite_wallet_server_selection_adapter.cpp index 9f12a10..c8e2ddb 100644 --- a/src/wallet/lite_wallet_server_selection_adapter.cpp +++ b/src/wallet/lite_wallet_server_selection_adapter.cpp @@ -447,17 +447,5 @@ LiteWalletServerSelectionUiExecutionResult executeLiteWalletServerSelectionUi( return result; } -LiteWalletServerSelectionUiExecutionAdapter::LiteWalletServerSelectionUiExecutionAdapter( - config::Settings& settings) - : settings_(settings) -{ -} - -LiteWalletServerSelectionUiExecutionResult LiteWalletServerSelectionUiExecutionAdapter::execute( - const LiteWalletServerSelectionUiExecutionInput& input) const -{ - return executeLiteWalletServerSelectionUi(settings_, input); -} - } // namespace wallet } // namespace dragonx \ No newline at end of file diff --git a/src/wallet/lite_wallet_server_selection_adapter.h b/src/wallet/lite_wallet_server_selection_adapter.h index b2a848b..dd25ab7 100644 --- a/src/wallet/lite_wallet_server_selection_adapter.h +++ b/src/wallet/lite_wallet_server_selection_adapter.h @@ -146,16 +146,5 @@ LiteWalletServerSelectionUiExecutionResult executeLiteWalletServerSelectionUi( config::Settings& settings, const LiteWalletServerSelectionUiExecutionInput& input); -class LiteWalletServerSelectionUiExecutionAdapter { -public: - explicit LiteWalletServerSelectionUiExecutionAdapter(config::Settings& settings); - - LiteWalletServerSelectionUiExecutionResult execute( - const LiteWalletServerSelectionUiExecutionInput& input) const; - -private: - config::Settings& settings_; -}; - } // namespace wallet } // namespace dragonx \ No newline at end of file