Skip to content
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
69aad4b
feat(platform): shielded transaction history
QuantumExplorer Jun 12, 2026
1fc46d9
fix: cover PersistentShieldedActivity in the storage explorer
QuantumExplorer Jun 12, 2026
00133c3
fix: address review on shielded activity (pending confirmation + reco…
QuantumExplorer Jun 12, 2026
a35bc9a
fix: partition and badge shielded activity rows by status, not height
QuantumExplorer Jun 12, 2026
97e190c
fix: address CodeRabbit review on shielded activity
QuantumExplorer Jun 12, 2026
ae31193
fix: write live activity entries to the in-memory store; overlap-base…
QuantumExplorer Jun 12, 2026
d64de16
docs: drop stale doc fragment above decode_cmx_array
QuantumExplorer Jun 12, 2026
60b7259
fix: stage Shield broadcast so ambiguous wait failures stay Pending
QuantumExplorer Jun 12, 2026
4196462
fix: address review on activity sorting, FFI marshalling, and lock scope
QuantumExplorer Jun 12, 2026
50b98ae
fix: per-batch note heights and stale-snapshot races in activity reco…
QuantumExplorer Jun 12, 2026
f1ce3f7
fix: preserve shield retry-safety code over FFI and purge activity ro…
QuantumExplorer Jun 12, 2026
ac2f2b4
docs: cover the shield path in map_spend_result's unconfirmed-arm com…
QuantumExplorer Jun 12, 2026
75406eb
fix: key activity rows by model identity, not entryId
QuantumExplorer Jun 12, 2026
433f099
docs: activity FFI rows are keyed by (wallet_id, account_index, entry…
QuantumExplorer Jun 12, 2026
b4479ff
docs: align activity-key docs with the (wallet_id, account_index, ent…
QuantumExplorer Jun 12, 2026
e3cddf8
fix: reject out-of-range activity tags on load and skip status flip o…
QuantumExplorer Jun 12, 2026
123ebbd
fix(rs-sdk-ffi): stop labeling unclassified SDK errors as "failed to …
QuantumExplorer Jun 13, 2026
3f5b255
Merge branch 'v3.1-dev' into claude/determined-mcnulty-afd936
QuantumExplorer Jun 13, 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
38 changes: 33 additions & 5 deletions packages/rs-sdk-ffi/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,13 @@ impl From<FFIError> for DashSDKError {
} else if error_str.contains("not found") || error_str.contains("Not found") {
(DashSDKErrorCode::NotFound, error_str)
} else {
// Default to network error with the original message
(
DashSDKErrorCode::NetworkError,
format!("Failed to fetch balances: {}", error_str),
)
// Unclassified SDK error: pass the original message through
// unchanged and map to InternalError rather than guessing a
// network cause. (Previously this hardcoded a "Failed to fetch
// balances:" prefix and the NetworkError code, mislabeling
// unrelated failures such as proof-verification errors from
// getDataContractHistory.)
(DashSDKErrorCode::InternalError, error_str)
};

(code, detailed_msg)
Expand Down Expand Up @@ -253,4 +255,30 @@ mod tests {
let err = dash_sdk::Error::Generic("identity not found".to_string());
assert_eq!(classify(err), DashSDKErrorCode::NotFound);
}

#[test]
fn unclassified_error_maps_to_internal_error_without_balance_prefix() {
// A proof-verification failure (e.g. from getDataContractHistory) matches
// none of the substring heuristics and must fall through the catch-all.
// It should be classified as InternalError and keep its original Display
// verbatim — no copy-pasted "Failed to fetch balances:" prefix.
let err = dash_sdk::Error::Generic(
"Proof verification error: corrupted element for the historical contract".to_string(),
);
// The catch-all passes the SDK error's Display through unchanged.
let expected = err.to_string();

let dash_sdk_error: DashSDKError = FFIError::SDKError(err).into();
let rendered = unsafe {
let m = std::ffi::CStr::from_ptr(dash_sdk_error.message)
.to_string_lossy()
.into_owned();
let _ = CString::from_raw(dash_sdk_error.message);
m
};

assert_eq!(dash_sdk_error.code, DashSDKErrorCode::InternalError);
assert_eq!(rendered, expected);
assert!(!rendered.contains("Failed to fetch balances"));
}
}
Loading