Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
63 changes: 30 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ qrcode = "0.14.1"
nix = { version = "0.31.1", features = ["signal"] }
eframe = { version = "0.35.0", features = ["persistence", "wgpu"] }
base64 = "0.22.1"
dash-sdk = { git = "https://github.com/dashpay/platform", branch = "dash-evo-tool", features = [
dash-sdk = { git = "https://github.com/dashpay/platform", rev = "0503f80df5529b1d4f91e58c49abe08cde7b283f", features = [
"core_key_wallet",
"core_key_wallet_manager",
"core_bincode",
Expand All @@ -28,12 +28,12 @@ dash-sdk = { git = "https://github.com/dashpay/platform", branch = "dash-evo-too
"core_spv",
"shielded",
] }
rs-sdk-trusted-context-provider = { git = "https://github.com/dashpay/platform", branch = "dash-evo-tool" }
platform-wallet = { git = "https://github.com/dashpay/platform", branch = "dash-evo-tool", features = [
rs-sdk-trusted-context-provider = { git = "https://github.com/dashpay/platform", rev = "0503f80df5529b1d4f91e58c49abe08cde7b283f" }
platform-wallet = { git = "https://github.com/dashpay/platform", rev = "0503f80df5529b1d4f91e58c49abe08cde7b283f", features = [
"serde",
"shielded",
] }
platform-wallet-storage = { git = "https://github.com/dashpay/platform", branch = "dash-evo-tool", features = [
platform-wallet-storage = { git = "https://github.com/dashpay/platform", rev = "0503f80df5529b1d4f91e58c49abe08cde7b283f", features = [
"shielded",
] }
zip32 = "0.2.0"
Expand Down
10 changes: 9 additions & 1 deletion src/wallet_backend/dashpay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,15 @@ impl WalletBackend {
managed
.record_dashpay_payment(tx_id, entry, &persister)
.map_err(|e| TaskError::WalletBackend {
source: Box::new(e.into()),
// TODO(platform-pr3968): `From<PersistenceError> for
// PlatformWalletError` doesn't exist at this rev (no typed
// `PersisterLoad(#[from] PersistenceError)` variant yet) —
// wrap via the generic `Persistence(String)` variant instead
// of `.into()`. Restore the typed conversion once platform
// re-adds it.
source: Box::new(platform_wallet::error::PlatformWalletError::Persistence(
e.to_string(),
)),
})?;
Ok(())
}
Expand Down
14 changes: 0 additions & 14 deletions src/wallet_backend/event_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,20 +422,6 @@ impl PlatformEventHandler for EventBridge {
self.nudge_refresh();
}

fn on_wallet_skipped_on_load(
&self,
wallet_id: platform_wallet::wallet::platform_wallet::WalletId,
reason: &platform_wallet::manager::load_outcome::SkipReason,
) {
// Public wallet id + structural reason only; never a secret. The
// user-facing banner is raised in `register_persisted_wallets`.
tracing::warn!(
wallet_id = %hex::encode(wallet_id),
%reason,
"A saved wallet was skipped on load because its stored data is corrupt"
);
}

fn on_shielded_sync_progress(&self, cumulative_scanned: u64, block_height: u64) {
// Downloaded-notes progress for an in-flight pass — drives the
// shielded tab's "scanning" indicator. Network-scoped (one pass covers
Expand Down
33 changes: 6 additions & 27 deletions src/wallet_backend/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,42 +19,21 @@
//! the load brings back nothing — exactly the funds-invisible state the
//! W1/W2 writers exist to prevent.
//!
//! The outcome types here are DET-opaque: [`LoadedWallets`] carries only
//! DET's [`WalletSeedHash`] keys and a DET-side [`PersistedLoadSkip`]
//! reason — no `platform_wallet` / `key_wallet` type crosses the seam.
//! The outcome type here is DET-opaque: [`LoadedWallets`] carries only
//! DET's [`WalletSeedHash`] keys — no `platform_wallet` / `key_wallet`
//! type crosses the seam.

use crate::model::wallet::WalletSeedHash;

/// Outcome of a persisted-wallet load pass, mapped to DET-opaque types.
///
/// Carries no upstream `platform-wallet` type. A non-empty `skipped`
/// list is still a **success**: a single corrupt persisted row is
/// reported and the remaining wallets load. A whole-load failure is a
/// `TaskError` from [`WalletBackend::load_from_persistor_seedless`], not
/// a populated `skipped`.
/// Carries no upstream `platform-wallet` type. Any load failure is a
/// `TaskError` from [`WalletBackend::load_from_persistor_seedless`] — the
/// upstream load either rebuilds every persisted wallet or fails whole.
///
/// [`WalletBackend::load_from_persistor_seedless`]: super::WalletBackend::load_from_persistor_seedless
#[derive(Debug, Default, Clone, PartialEq, Eq)]
pub struct LoadedWallets {
/// Wallets now registered with the backend, keyed by DET's seed hash.
pub loaded: Vec<WalletSeedHash>,
/// Wallets present on disk but skipped because their persisted row
/// was unusable. The [`WalletSeedHash`] is present only when the
/// skipped wallet could be matched to a DET sidecar entry; an
/// unmatched skip carries `None`.
pub skipped: Vec<(Option<WalletSeedHash>, PersistedLoadSkip)>,
}

/// DET-opaque reason a persisted wallet row was skipped during load.
///
/// Mirrors the upstream corrupt-row families without leaking the
/// upstream `CorruptKind` type or any row-derived bytes.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum PersistedLoadSkip {
/// The wallet row has no usable account manifest to rebuild from.
MissingManifest,
/// The persisted account xpub failed to parse.
MalformedXpub,
/// Any other structural decode/projection failure on the row.
DecodeError,
}
Loading