diff --git a/packages/rs-dpp/src/state_transition/state_transitions/shielded/shield_from_asset_lock_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/shielded/shield_from_asset_lock_transition/mod.rs index 19f4acede1..1d6476dd33 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/shielded/shield_from_asset_lock_transition/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/shielded/shield_from_asset_lock_transition/mod.rs @@ -4,7 +4,8 @@ mod proved; #[cfg(all( test, feature = "state-transition-signing", - feature = "core_key_wallet" + feature = "core_key_wallet", + feature = "shielded-client" ))] mod signing_tests; mod state_transition_estimated_fee_validation; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/shielded/shield_from_asset_lock_transition/signing_tests.rs b/packages/rs-dpp/src/state_transition/state_transitions/shielded/shield_from_asset_lock_transition/signing_tests.rs index b2563604e6..0e3f299474 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/shielded/shield_from_asset_lock_transition/signing_tests.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/shielded/shield_from_asset_lock_transition/signing_tests.rs @@ -10,10 +10,15 @@ //! in `state_transition::mod` pins `sign_with_core_signer` against //! `sign_by_private_key` — we don't re-derive that contract here. +// `crate::shielded::builder` (the high-level bundle builder these tests drive) only +// exists under `shielded-client`, so this module must require it too — otherwise the +// `--all-targets` feature-unified lib-test target (which enables `state-transition-signing` +// + `core_key_wallet` without `shielded-client`) fails to resolve the builder import. #![cfg(all( test, feature = "state-transition-signing", - feature = "core_key_wallet" + feature = "core_key_wallet", + feature = "shielded-client" ))] use crate::identity::state_transition::asset_lock_proof::chain::ChainAssetLockProof; diff --git a/packages/rs-platform-wallet-ffi/src/persistence.rs b/packages/rs-platform-wallet-ffi/src/persistence.rs index 2cb9e57400..60405d284f 100644 --- a/packages/rs-platform-wallet-ffi/src/persistence.rs +++ b/packages/rs-platform-wallet-ffi/src/persistence.rs @@ -1430,10 +1430,10 @@ impl PlatformWalletPersistence for FFIPersister { .on_load_shielded_outgoing_notes_free_fn .is_some() { - return Err("on_load_shielded_outgoing_notes_fn and \ - on_load_shielded_outgoing_notes_free_fn must be provided together" - .to_string() - .into()); + return Err(PersistenceError::backend( + "on_load_shielded_outgoing_notes_fn and \ + on_load_shielded_outgoing_notes_free_fn must be provided together", + )); } // 1) notes @@ -1508,11 +1508,10 @@ impl PlatformWalletPersistence for FFIPersister { let rc = unsafe { load_outgoing(self.callbacks.context, &mut out_ptr, &mut out_count) }; if rc != 0 { - return Err(format!( + return Err(PersistenceError::backend(format!( "on_load_shielded_outgoing_notes_fn returned error code {}", rc - ) - .into()); + ))); } struct OutgoingGuard { context: *mut c_void,