Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
64fab20
more work
QuantumExplorer Feb 17, 2026
f42b58d
Merge branch 'v1.0-dev' into zk
QuantumExplorer Feb 17, 2026
f8df452
more work
QuantumExplorer Feb 24, 2026
64ca962
Merge branch 'v1.0-dev' into zk
QuantumExplorer Feb 24, 2026
3cbf5ba
Merge remote-tracking branch 'origin/v1.0-dev' into zk
lklimek Feb 24, 2026
0cde65f
fix(spv): zero out stale per-address balances during reconciliation (…
lklimek Feb 24, 2026
0879c45
fix: handle malformed YAML gracefully in load_testnet_nodes_from_yml …
lklimek Feb 24, 2026
4d8b2b2
chore: let Claude write manual test scenarios for PRs (#634)
lklimek Feb 24, 2026
17650e9
build(flatpak): use only-arches for dynamic protoc architecture selec…
lklimek Feb 24, 2026
da00777
Merge branch 'v1.0-dev' into zk-extract/all-merged
lklimek Feb 24, 2026
7668de9
Merge remote-tracking branch 'origin/zk-extract/all-merged' into zk-e…
lklimek Feb 24, 2026
1ec2e7e
fix(ci): remove local path patches, use git deps for platform crates
lklimek Feb 24, 2026
0710295
fix(test): store wallet in DB before registering addresses
lklimek Feb 25, 2026
e078d0b
Merge remote-tracking branch 'origin/v1.0-dev' into zk-extract/all-me…
lklimek Feb 25, 2026
7e95598
Merge remote-tracking branch 'origin/v1.0-dev' into zk-extract/all-me…
lklimek Feb 25, 2026
afd7a4c
fix(build): restore shielded module declaration removed during merge
lklimek Feb 25, 2026
64651c5
fix(test): restore store_wallet calls lost in merge (#663)
Copilot Feb 25, 2026
e2060b2
Merge remote-tracking branch 'origin/v1.0-dev' into zk-extract/all-me…
lklimek Mar 6, 2026
91314ca
Merge remote-tracking branch 'origin/v1.0-dev' into zk-extract/all-me…
lklimek Mar 17, 2026
508817a
chore: update platform dependency to 3.1-dev branch
QuantumExplorer Mar 17, 2026
0cb6d7e
refactor: migrate shielded module from Result<T, String> to typed Tas…
lklimek Mar 17, 2026
a9f6c29
Merge origin/zk and migrate platform dependency to v3.1-dev
lklimek Mar 17, 2026
62961b1
Merge pull request #644 from dashpay/zk-extract/all-merged
QuantumExplorer Mar 22, 2026
d8285fa
Merge remote-tracking branch 'origin/zk' into zk
QuantumExplorer Mar 22, 2026
12b7c53
fix(ui): prevent settings password row from clipping right edge
QuantumExplorer Mar 23, 2026
1d0030d
Merge branch 'zk-fixes' of https://github.com/dashpay/dash-evo-tool i…
lklimek Mar 23, 2026
d7badfe
Merge remote-tracking branch 'origin/v1.0-dev' into zk-fixes
lklimek Mar 23, 2026
08cecbb
fix(rpc): include host:port in connection-refused errors and always s…
lklimek Mar 23, 2026
c4c7b30
Merge remote-tracking branch 'origin/v1.0-dev' into zk-fixes
lklimek Mar 23, 2026
d51745f
fix(ui): save RPC password for active network instead of hardcoded Re…
lklimek Mar 23, 2026
227bbce
fix(ui): ensure funding method dropdown fits all items without scrollbar
lklimek Mar 23, 2026
567e9be
fix(error): show actionable message for insufficient identity balance
lklimek Mar 23, 2026
a38c594
fix(ui): clear stale error banners when saving RPC password
lklimek Mar 23, 2026
e6d72af
fix: use network-compatible comparison for platform address lookups
lklimek Mar 23, 2026
e908b82
fix(error): add actionable messages for shielded fee and pool-size er…
lklimek Mar 23, 2026
c91d53b
fix(error): add actionable message for shielded anchor mismatch
lklimek Mar 23, 2026
1ac5292
fix(shielded): auto-resync notes and retry on anchor mismatch
lklimek Mar 23, 2026
56a1f2e
fix(shielded): ensure shielded tables exist and log DB errors during …
lklimek Mar 23, 2026
2f991f2
fix(db): consolidate migrations v28-v32 into v33
lklimek Mar 23, 2026
f0040f4
fix(db): consolidate migrations v28-v32 into v33
lklimek Mar 23, 2026
b29811c
Merge remote-tracking branch 'origin/v1.0-dev' into fix/consolidate-m…
lklimek Mar 23, 2026
19c4934
chore: pin platform dependency to zk-fixes revision
lklimek Mar 23, 2026
ab8a230
fix(db): address PR review — fresh schema, error propagation, rename …
lklimek Mar 23, 2026
6a36d5f
fix(db): address PR review — fresh schema, error propagation, rename …
lklimek Mar 23, 2026
f4efd64
fix(db): add foreign key constraints to shielded tables
lklimek Mar 23, 2026
1e59763
fix(db): add foreign key constraints to shielded tables
lklimek Mar 23, 2026
9d4d65a
Merge remote-tracking branch 'origin/v1.0-dev' into fix/consolidate-m…
lklimek Mar 23, 2026
60f9031
Merge remote-tracking branch 'origin/fix/consolidate-migrations-v33-z…
lklimek Mar 23, 2026
08495bf
fix(db): remove duplicate shielded methods after v1.0-dev merge
lklimek Mar 23, 2026
c3af91a
fix(test): remove duplicate wallet store in register_test_address
lklimek Mar 23, 2026
77bdd70
fix(shielded): address PR review — error propagation, retry helper, s…
lklimek Mar 23, 2026
67dfab7
fix(error): address PR review — Amount formatting, Display completeness
lklimek Mar 23, 2026
4b1de7b
fix(rpc): address PR review — context fallback, success banner, error…
lklimek Mar 23, 2026
fe69656
chore: simplify shielded helpers comment in initialization.rs
lklimek Mar 23, 2026
4d47ea4
fix(db): address PR #789 review — doc comments, migration default
lklimek Mar 23, 2026
ddea453
fix(db): remove duplicate shielded methods after v1.0-dev merge
lklimek Mar 23, 2026
0d4e359
chore: simplify shielded helpers comment in initialization.rs
lklimek Mar 23, 2026
b0df68b
chore(db): document migration DEFAULT 2 vs fresh DEFAULT 0
lklimek Mar 23, 2026
d563250
fix(wallet): address review — zero-balance detection, status warning
lklimek Mar 23, 2026
3c316a5
fix(error): address review — typed BIP32 source, migration error variant
lklimek Mar 23, 2026
4d6dd98
test(db): add v33 consolidated migration regression tests
lklimek Mar 23, 2026
da4814a
fix(ui): show warning when config save fails instead of success
lklimek Mar 23, 2026
78f25a8
fix(error): consolidate format_credits_as_dash and remove jargon from…
lklimek Mar 23, 2026
89d8a97
fix(test): remove duplicate wallet store in register_test_address
lklimek Mar 23, 2026
aff86d9
fix(core): log chain lock RPC errors that aren't auth/connection fail…
lklimek Mar 24, 2026
1a8c047
feat(ui): surface chain lock RPC errors in Networks tab
lklimek Mar 24, 2026
ddcb742
feat(ui): unified AddressInput component with autocomplete (#787)
lklimek Mar 24, 2026
6e2b2b0
fix(error): handle asset lock and shielded insufficient funds errors …
lklimek Mar 24, 2026
3e744c8
fix(ui): use AmountInput component for all amount inputs in wallet sc…
lklimek Mar 24, 2026
839f1ee
docs: add UI components reference and teach CLAUDE.md to use it
lklimek Mar 24, 2026
3e2fac6
feat(ui): redesign wallet screen information architecture
lklimek Mar 24, 2026
51b16b2
fix(ui): use AddressInput component in Mine dialog for core address s…
lklimek Mar 24, 2026
9bae9f8
fix(ui): trigger shielded balance refresh after all shielding operations
lklimek Mar 24, 2026
ae63652
chore: demote cookie auth fallback log to trace level
lklimek Mar 24, 2026
8dae295
fix(ui): prevent transaction list showing wrong wallet data
lklimek Mar 24, 2026
f1f8ba9
fix(ui): auto-show zero-balance addresses when wallet is empty
lklimek Mar 24, 2026
565cbd2
fix(ui): address PR review — shielded balance, dev tools layout
lklimek Mar 24, 2026
019bce6
Merge remote-tracking branch 'origin/zk-fixes' into feat/wallet-ui-re…
lklimek Mar 24, 2026
ce83455
fix(ui): rename transaction heading, add explorer link, merge zk-fixes
lklimek Mar 24, 2026
9c07f95
fix(ui): trigger shielded sync on wallet refresh and wallet switch
lklimek Mar 24, 2026
df78e49
fix(log): add diagnostic logging for shielded transfer operations
lklimek Mar 24, 2026
7e11a2b
fix(ui): improve Dev Tools dropdown layout and refresh mode cycling
lklimek Mar 24, 2026
e8eccc8
fix(ui): fix shielded balance conversion, add tab balances, reorder s…
lklimek Mar 24, 2026
9790095
feat(ui): collapsible sections, move tx history to Dash Core tab, res…
lklimek Mar 24, 2026
4ad1b1b
Merge remote-tracking branch 'origin/zk-fixes' into feat/wallet-ui-re…
lklimek Mar 24, 2026
ed196d6
fix(ui): improve shielded transfer UX messaging for balance update de…
lklimek Mar 24, 2026
73f2f3b
feat(ui): consolidate dev-mode accounts into System tab, limit balanc…
lklimek Mar 24, 2026
63ce0e1
fix(shielded): scope commitment tree per wallet for multi-wallet corr…
lklimek Mar 24, 2026
f16d982
Merge remote-tracking branch 'origin/zk-fixes' into feat/wallet-ui-re…
lklimek Mar 24, 2026
875ee14
Merge pull request #789 from dashpay/fix/consolidate-migrations-v33-zk
lklimek Mar 24, 2026
0d5a09d
Merge branch 'zk' into zk-fixes
lklimek Mar 24, 2026
6b41301
Merge branch 'zk-fixes' into feat/wallet-ui-redesign
lklimek Mar 24, 2026
e41a72d
fix(shielded): prevent permanent state leak on sync_notes failure in …
lklimek Mar 24, 2026
6e775a4
fix(ui): apply password change for current session even when config s…
lklimek Mar 24, 2026
95782ae
fix(error): use dedicated TaskError variants for non-build wallet errors
lklimek Mar 24, 2026
a12cc6a
fix(error): preserve error chain in CoreRpcConnectionFailed
lklimek Mar 24, 2026
280820f
feat(ui): two-column wallet header layout, rename Tools to Advanced
lklimek Mar 24, 2026
344c229
fix(test): rename test_v33_migration_fresh_install to match DB versio…
lklimek Mar 24, 2026
712049b
revert(shielded): use shared main DB for commitment tree instead of p…
lklimek Mar 24, 2026
ee5b8a9
Merge branch 'zk-fixes' into feat/wallet-ui-redesign
lklimek Mar 24, 2026
daa825b
fix(shielded): fix stale clear_commitment_tree_for_wallet reference a…
lklimek Mar 24, 2026
b561c3e
fix(shielded): harden anchor retry, commitment tree clearing, and sta…
lklimek Mar 24, 2026
f640aaa
fix(core): sanitize RPC errors and simplify CoreRpcConnectionFailed
lklimek Mar 24, 2026
6eed03c
fix(ui): config permissions, address detection, and per-frame caching
lklimek Mar 24, 2026
9ee4e93
Merge remote-tracking branch 'origin/zk-fixes' into feat/wallet-ui-re…
lklimek Mar 24, 2026
810a686
fix(logging): correct log levels per coding best practices
lklimek Mar 24, 2026
801f730
chore: minor ui fixes
lklimek Mar 24, 2026
907cdda
feat(ui): replace Advanced dropdown with inline right-aligned buttons
lklimek Mar 24, 2026
21882ce
fix(ui): use allocate_ui_with_layout to right-align dev buttons
lklimek Mar 24, 2026
b52369e
fix(ui): eagerly initialize shielded balance on wallet screen open
lklimek Mar 24, 2026
bdb48aa
fix: remove stale balance_breakdown_expanded field from cherry-pick
lklimek Mar 24, 2026
d488892
fix(ui): move action buttons to full-width row below header columns
lklimek Mar 24, 2026
e693f15
refactor(ui): change sync status to bullet-point layout
lklimek Mar 24, 2026
54609a9
fix(shielded): prevent double balance from redundant init + sync chain
lklimek Mar 24, 2026
24a3521
refactor(shielded): move initialization entirely to backend, remove U…
lklimek Mar 24, 2026
a5e7930
fix(shielded): deduplicate notes in sync to prevent double balance
lklimek Mar 24, 2026
a4be13b
feat(ui): add shielded diversified address table
lklimek Mar 24, 2026
7581713
fix: address review findings — duplicate controls, perf, tab visibility
lklimek Mar 25, 2026
8e2eb9c
fix(ui): replace mutex unwrap() with graceful error handling in shiel…
lklimek Mar 25, 2026
e706c3f
Merge remote-tracking branch 'origin/zk-fixes' into feat/wallet-ui-re…
lklimek Mar 26, 2026
e140c60
Merge remote-tracking branch 'origin/v1.0-dev' into zk
lklimek Mar 26, 2026
f2e8142
fix(mcp): resolve async lifetime errors for Rust 2024 edition
lklimek Mar 26, 2026
46ea490
chore: fix mcp dispatch
lklimek Mar 26, 2026
cfa1dbb
doc: remove obsolete manual teting docs
lklimek Mar 26, 2026
05a4f20
Merge remote-tracking branch 'origin/zk' into zk-fixes
lklimek Mar 26, 2026
c7a5ca7
Merge remote-tracking branch 'origin/v1.0-dev' into zk-fixes
lklimek Mar 26, 2026
acf4058
fix(ui): include zero-balance addresses in AddressInput wallet entries
lklimek Mar 26, 2026
0e1a958
fix(ui): sort AddressInput wallet entries alphabetically
lklimek Mar 26, 2026
790453c
revert: remove redundant sort in extract_wallet_entries
lklimek Mar 26, 2026
005cadf
fix(ui): clarify shielded network validation logic
lklimek Mar 26, 2026
92f2e70
fix(ui): include send-all transactions in wallet history
lklimek Mar 26, 2026
3cd095e
fix(ui): use is_ours flag for transaction filtering
lklimek Mar 26, 2026
e363c6d
test(e2e): verify is_ours flag for SPV send and receive transactions
lklimek Mar 26, 2026
49d9c5d
Merge remote-tracking branch 'origin/zk-fixes' into feat/wallet-ui-re…
lklimek Mar 26, 2026
24256db
fix(core): clear RPC error state on successful chain lock fetch
lklimek Mar 26, 2026
4187fff
fix(model): move is_platform_address_string from UI helpers to model …
lklimek Mar 26, 2026
bb0c6dc
fix(ui): add actionable guidance to address validation error messages
lklimek Mar 26, 2026
f55b138
fix(ui): invalidate address inputs on all screens during context switch
lklimek Mar 26, 2026
7046358
fix(ui): clear password field on network switch when no config exists
lklimek Mar 26, 2026
1dcf070
fix(ui): clear validated_destination in invalidate_address_input
lklimek Mar 26, 2026
eaccb82
fix(ui): consume ShieldedNotesSynced to update shielded send screen s…
lklimek Mar 26, 2026
6a43e7c
style: apply cargo +nightly fmt formatting
lklimek Mar 26, 2026
5e4df1c
fix(model): disambiguate Core vs Identity address detection by prefix
lklimek Mar 26, 2026
6efba25
Merge remote-tracking branch 'origin/v1.0-dev' into feat/wallet-ui-re…
lklimek Mar 26, 2026
642bd58
fix(core): show actual RPC error on Networks page instead of generic …
lklimek Mar 26, 2026
3c89c3a
fix(db): resolve deadlock in clear_network_data
lklimek Mar 26, 2026
5e934a0
fix(ui): replace mutex unwrap() with graceful .ok() in shielded_sync_…
lklimek Mar 26, 2026
d3faf5e
fix(ui): replace RwLock unwrap() with graceful error handling in shie…
lklimek Mar 26, 2026
a51fb67
fix(spv): add debug log when overriding is_ours for receive transactions
lklimek Mar 26, 2026
e2ba5fc
fix(shielded): log warning on note value divergence during position d…
lklimek Mar 26, 2026
47c8821
perf(model): avoid allocation in is_platform_address_string
lklimek Mar 26, 2026
631aa1a
refactor(ui): remove unused label field and is_key_only from AccountS…
lklimek Mar 26, 2026
b4fe404
refactor(ui): avoid cloning full AccountTab enum in tab content match
lklimek Mar 26, 2026
ceb96af
fix(ui): clear validated_address on network switch in mine dialog
lklimek Mar 26, 2026
d595fb5
refactor(model): move truncate_address to model layer and document AS…
lklimek Mar 26, 2026
d9d6ac9
docs(shielded): document why spawn_blocking trampoline is needed in q…
lklimek Mar 26, 2026
8bab96b
style: apply nightly rustfmt formatting
lklimek Mar 26, 2026
8b73885
fix(wallet): bootstrap platform addresses on wallet creation
lklimek Mar 26, 2026
4d4ee72
fix(ui): show bootstrapped platform addresses in AddressInput
lklimek Mar 26, 2026
1d91082
refactor(ui): pass account filter directly to render_address_table
lklimek Mar 26, 2026
f3ca538
perf(shielded): move wallet initialization to background thread
lklimek Mar 26, 2026
261fe9e
test(spv): add unit tests for is_ours override logic
lklimek Mar 26, 2026
0b323c1
docs(user-stories): add stories for wallet tab redesign
lklimek Mar 26, 2026
11578bd
style: apply nightly rustfmt formatting
lklimek Mar 26, 2026
c096105
feat(ui): distinguish change addresses in AddressInput autocomplete
lklimek Mar 26, 2026
e95a393
fix(ui): exclude change addresses from Send screen destination input
lklimek Mar 26, 2026
b475d1a
feat(ui): add new address generation button to wallet tabs
lklimek Mar 26, 2026
4889de7
fix(ui): exclude system addresses from AddressInput autocomplete
lklimek Mar 26, 2026
f6b7bf7
feat(ui): always show address type label, enable type-based filtering
lklimek Mar 26, 2026
d23388a
fix(error): add user-friendly message for shielded nonce mismatch
lklimek Mar 26, 2026
fabcb73
style: fix stable rustfmt formatting for address_input filter
lklimek Mar 26, 2026
1e47bd3
fix(ui): compare WalletSeedHash in shielded ScreenType equality
lklimek Mar 26, 2026
1b276dd
fix(ui): reset all transient state in ShieldedTabView::update_seed_hash
lklimek Mar 26, 2026
b2076bb
fix(error): replace string-based SPV payment errors with typed TaskEr…
lklimek Mar 26, 2026
7161398
fix(perf): skip Halo2 proving key warmup in test builds
lklimek Mar 26, 2026
52b5572
fix(ui): delegate is_platform_address and rewrite hints as full sente…
lklimek Mar 26, 2026
e057e52
fix(ui): sanitize raw RPC error strings in connection status display
lklimek Mar 26, 2026
3c8466a
fix(error): rewrite SPV error messages for everyday users
lklimek Mar 26, 2026
1b507c9
Merge remote-tracking branch 'origin/v1.0-dev' into fix/wallet-ui-iss…
lklimek Mar 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@ impl AppState {

// Warm up the Halo 2 ProvingKey in a background thread (~30s build).
// This ensures the key is ready for the user's first shielded operation.
#[cfg(not(feature = "testing"))]
std::thread::spawn(|| {
let _ = crate::context::shielded::get_proving_key();
tracing::info!("Halo 2 ProvingKey built and cached");
Expand Down
82 changes: 48 additions & 34 deletions src/backend_task/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ impl AppContext {
if let Some(task_err) = Self::chain_lock_rpc_error(active_config, e) {
return Err(task_err);
}
// Non-auth, non-connection error — show the actual error
// Non-auth, non-connection error — show a sanitized message
// in the Networks page status display for debugging.
tracing::warn!(network = ?self.network, error = %e, "Chain lock query failed on active network");
Some(format!("RPC error: {e}"))
Some(sanitize_rpc_error(&e.to_string()))
} else {
// Successful chain lock fetch — clear any lingering RPC error
// so the connection status recovers after a transient outage.
Expand Down Expand Up @@ -697,17 +697,15 @@ impl AppContext {

// Get UTXOs and change address from the wallet account
let (utxos, change_index) = {
let managed_info =
wm.get_wallet_info(wallet_id)
.ok_or_else(|| TaskError::WalletPaymentFailed {
detail: "Wallet info unavailable".to_string(),
})?;
let managed_info = wm
.get_wallet_info(wallet_id)
.ok_or(TaskError::WalletInfoUnavailable)?;
let account = managed_info
.accounts()
.standard_bip44_accounts
.get(&DEFAULT_BIP44_ACCOUNT_INDEX)
.ok_or_else(|| TaskError::WalletPaymentFailed {
detail: "BIP44 account missing".to_string(),
.ok_or(TaskError::MissingBip44Account {
index: DEFAULT_BIP44_ACCOUNT_INDEX,
})?;

let utxos: Vec<_> = account.utxos.values().cloned().collect();
Expand All @@ -717,21 +715,17 @@ impl AppContext {

let wallet = wm
.get_wallet(wallet_id)
.ok_or_else(|| TaskError::WalletPaymentFailed {
detail: "Wallet object not found".to_string(),
})?;
.ok_or(TaskError::WalletInfoUnavailable)?;
let wallet_account = wallet
.accounts
.standard_bip44_accounts
.get(&DEFAULT_BIP44_ACCOUNT_INDEX)
.ok_or_else(|| TaskError::WalletPaymentFailed {
detail: "BIP44 wallet account missing".to_string(),
.ok_or(TaskError::MissingBip44Account {
index: DEFAULT_BIP44_ACCOUNT_INDEX,
})?;
let change_addr = wallet_account
.derive_change_address(change_index)
.map_err(|e| TaskError::WalletPaymentFailed {
detail: format!("Failed to derive change address: {e}"),
})?;
.map_err(|e| TaskError::ChangeAddressDerivation { source: e })?;

loop {
let scaled_recipients: Vec<(Address, u64)> = recipients
Expand Down Expand Up @@ -801,17 +795,15 @@ impl AppContext {
account_index: u32,
current_height: u32,
) -> Result<u64, TaskError> {
let managed_info =
wm.get_wallet_info(wallet_id)
.ok_or_else(|| TaskError::WalletPaymentFailed {
detail: "Wallet info unavailable".to_string(),
})?;
let managed_info = wm
.get_wallet_info(wallet_id)
.ok_or(TaskError::WalletInfoUnavailable)?;
let collection = managed_info.accounts();
let account = collection
.standard_bip44_accounts
.get(&account_index)
.ok_or_else(|| TaskError::WalletPaymentFailed {
detail: "BIP44 account missing".to_string(),
.ok_or(TaskError::MissingBip44Account {
index: account_index,
})?;

let mut spendable_total = 0u64;
Expand Down Expand Up @@ -896,20 +888,16 @@ impl AppContext {
) -> Result<Transaction, TaskError> {
let wallet = wm
.get_wallet(wallet_id)
.ok_or_else(|| TaskError::WalletPaymentFailed {
detail: "Wallet object not found".to_string(),
})?;
let managed_info =
wm.get_wallet_info(wallet_id)
.ok_or_else(|| TaskError::WalletPaymentFailed {
detail: "Wallet info unavailable".to_string(),
})?;
.ok_or(TaskError::WalletInfoUnavailable)?;
let managed_info = wm
.get_wallet_info(wallet_id)
.ok_or(TaskError::WalletInfoUnavailable)?;
let accounts = managed_info.accounts();
let account = accounts
.standard_bip44_accounts
.get(&DEFAULT_BIP44_ACCOUNT_INDEX)
.ok_or_else(|| TaskError::WalletPaymentFailed {
detail: "BIP44 account missing".to_string(),
.ok_or(TaskError::MissingBip44Account {
index: DEFAULT_BIP44_ACCOUNT_INDEX,
})?;

let secp = Secp256k1::new();
Expand Down Expand Up @@ -999,3 +987,29 @@ impl AppContext {
size
}
}

/// Sanitize raw RPC error strings for display in connection status.
///
/// Strips OS-level error details and transport/RPC wrappers, keeping only
/// the meaningful description for the Networks page status display.
fn sanitize_rpc_error(raw: &str) -> String {
let mut s = raw.to_string();

// Strip trailing OS error codes: "Connection refused (os error 111)" -> "Connection refused"
if let Some(pos) = s.find("(os error") {
s = s[..pos].trim_end().to_string();
}

// Strip nested wrapper prefixes to get the actual error message
for prefix in &["RPC error:", "transport error:", "JSON-RPC error:"] {
if let Some(pos) = s.find(prefix) {
s = s[pos + prefix.len()..].trim_start().to_string();
}
}

if s.is_empty() {
"Could not reach the node.".to_string()
} else {
s
}
Comment thread
lklimek marked this conversation as resolved.
}
15 changes: 15 additions & 0 deletions src/backend_task/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,21 @@ pub enum TaskError {
#[error("Could not complete the payment. Please check your wallet balance and retry.")]
WalletPaymentFailed { detail: String },

/// Could not access wallet information from the SPV manager.
#[error("Your wallet is still loading. Please wait a moment and try again.")]
WalletInfoUnavailable,

/// Expected BIP44 account not found at the given index.
#[error("Your wallet needs to be refreshed before sending. Please refresh and try again.")]
MissingBip44Account { index: u32 },

/// Could not derive a change address from the wallet account.
#[error("Could not prepare the transaction. Please refresh your wallet and try again.")]
ChangeAddressDerivation {
#[source]
source: dash_sdk::dpp::key_wallet::Error,
},

// ──────────────────────────────────────────────────────────────────────────
// Token query errors (identity / recipient validation)
// ──────────────────────────────────────────────────────────────────────────
Expand Down
16 changes: 7 additions & 9 deletions src/ui/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1115,18 +1115,16 @@ pub fn show_group_token_success_screen_with_fee(

/// Check if a string looks like a Platform Bech32m address.
///
/// Supports both the current prefix (`dash1`/`tdash1`) and the legacy
/// prefix (`evo1`/`tevo1`) so that old addresses stored in the DB or
/// copied from older tools continue to work.
/// Delegates to [`is_platform_address_string`] which uses the canonical
/// HRP constants and case-insensitive comparison.
pub fn is_platform_address(s: &str) -> bool {
s.starts_with("dash1")
|| s.starts_with("tdash1")
|| s.starts_with("evo1")
|| s.starts_with("tevo1")
is_platform_address_string(s)
}

/// Human-readable hint for Platform address input fields.
pub const PLATFORM_ADDRESS_HINT: &str = "dash1... or tdash1...";
pub const PLATFORM_ADDRESS_HINT: &str =
"Enter a Platform address starting with \"dash1\" or \"tdash1\".";

/// Example Platform address prefixes for error messages.
pub const PLATFORM_ADDRESS_EXAMPLES: &str = "dash1.../tdash1...";
pub const PLATFORM_ADDRESS_EXAMPLES: &str =
"Valid prefixes are \"dash1\" for mainnet and \"tdash1\" for testnet.";
12 changes: 6 additions & 6 deletions src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,13 +429,13 @@ impl PartialEq for ScreenType {
(ScreenType::DashPayQRGenerator, ScreenType::DashPayQRGenerator) => true,
(ScreenType::DashPayProfileSearch, ScreenType::DashPayProfileSearch) => true,
// Shielded screens
(ScreenType::ShieldCreditsScreen(_), ScreenType::ShieldCreditsScreen(_)) => true,
(ScreenType::ShieldCreditsScreen(a), ScreenType::ShieldCreditsScreen(b)) => a == b,
(
ScreenType::ShieldFromAssetLockScreen(_),
ScreenType::ShieldFromAssetLockScreen(_),
) => true,
(ScreenType::ShieldedSendScreen(_), ScreenType::ShieldedSendScreen(_)) => true,
(ScreenType::UnshieldCreditsScreen(_), ScreenType::UnshieldCreditsScreen(_)) => true,
ScreenType::ShieldFromAssetLockScreen(a),
ScreenType::ShieldFromAssetLockScreen(b),
) => a == b,
(ScreenType::ShieldedSendScreen(a), ScreenType::ShieldedSendScreen(b)) => a == b,
(ScreenType::UnshieldCreditsScreen(a), ScreenType::UnshieldCreditsScreen(b)) => a == b,
_ => false,
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/ui/wallets/shielded_tab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ impl ShieldedTabView {
self.shielded_balance = 0;
self.error_message = None;
self.success_message = None;
self.initializing = false;
self.syncing = false;
self.pending_task = None;
self.address_count = 1;
}
}

Expand Down
Loading