You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ui-spv): centralize single-key SPV notice and harden shield cleanup
- Move the "single-key wallets require Dash Core" copy and its
MessageBanner rendering into a shared ui::wallets helper
(SINGLE_KEY_REQUIRES_CORE_MESSAGE + render_single_key_requires_core_banner)
so single_key_view and single_key_send_screen consume one source of truth.
- Revert wallets_screen::single_key_view back to private now that the
constant no longer needs to cross module boundaries.
- Use try_lock() with WouldBlock/Poisoned handling on the
shield_from_asset_lock broadcast-failure cleanup path so a contended
transactions_waiting_for_finality mutex can never block the error return.
Matches the style of the existing timeout-path cleanup, which is kept
intact (WouldBlock -> debug, Poisoned -> warn + recover).
- Simplify tests/backend-e2e/core_tasks.rs TC-003 to the SPV-only path:
the harness runs in SPV mode, so the RPC branch was dead code.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
/// Shared user-facing copy shown in every surface (tooltips, inline banners)
20
+
/// where a single-key wallet action that needs Core (sending, refreshing
21
+
/// balances) is unavailable because the app is running on the built-in SPV
22
+
/// backend. Centralised so the wording stays consistent and a single string
23
+
/// needs updating when translations land.
24
+
///
25
+
/// Intentionally action-specific: receiving and viewing an already-loaded
26
+
/// balance/UTXO list still work in SPV mode, so the copy must not imply the
27
+
/// whole wallet is unusable.
28
+
pubconstSINGLE_KEY_REQUIRES_CORE_MESSAGE:&str = "Sending and refreshing balances for single-key wallets require a local Dash Core node. Open Settings, switch to Expert mode, and select Local Dash Core node to enable these actions. Receiving still works in SPV mode.";
29
+
30
+
/// Renders the persistent "single-key wallets require Dash Core" notice as a
31
+
/// [`MessageBanner`] anchored to the current surface. Unlike the global
32
+
/// banner, this is not dismissed automatically — the underlying app state
33
+
/// (SPV backend mode) is what drives its visibility.
34
+
///
35
+
/// Constructed fresh each frame on purpose: this is a persistent state notice
36
+
/// (bound to the SPV backend mode), not a transient task result, so we want
37
+
/// it visible the whole time the mode is active. A fresh instance every frame
38
+
/// means the auto-dismiss timer never fires and the banner is shown
39
+
/// consistently; rendering is cheap and egui handles the repainting.
/// Shown as a disabled-button tooltip and in the in-screen warning banner for
13
-
/// any single-key-wallet action that depends on Dash Core RPC. Exported so the
14
-
/// dedicated send screen can reuse the same copy.
15
-
pub(crate)constSINGLE_KEY_REQUIRES_CORE:&str = "Single-key wallets do not yet support SPV. Open Settings, switch to Expert mode, and select Local Dash Core node to use this wallet.";
16
-
17
13
implWalletsBalancesScreen{
18
14
/// Render the detail view for a selected single key wallet
19
15
pub(super)fnrender_single_key_wallet_view(
@@ -60,19 +56,8 @@ impl WalletsBalancesScreen {
60
56
// are unavailable. The actions themselves are greyed out
61
57
// below; this banner is the "why" users otherwise wouldn't
62
58
// see from a silent disable.
63
-
//
64
-
// We construct the `MessageBanner` as a fresh local each
65
-
// frame on purpose: this is a persistent state notice
66
-
// (bound to the SPV backend mode), not a transient task
67
-
// result, so we want it visible the whole time the mode
68
-
// is active. A fresh instance every frame means the
69
-
// auto-dismiss timer never fires and the banner is shown
70
-
// consistently; rendering is cheap and egui handles the
0 commit comments