From 3148b96430611b54ce25bd86bc8c6ba9dd6b104a Mon Sep 17 00:00:00 2001 From: fluidvanadium Date: Wed, 24 Jul 2024 17:31:30 +0000 Subject: [PATCH] remove usk_to_tkey --- zcash_client_backend/src/data_api/wallet.rs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/zcash_client_backend/src/data_api/wallet.rs b/zcash_client_backend/src/data_api/wallet.rs index 611b0c26ba..ad1498cde7 100644 --- a/zcash_client_backend/src/data_api/wallet.rs +++ b/zcash_client_backend/src/data_api/wallet.rs @@ -620,7 +620,6 @@ where &step_results, step, None, - None, )?; step_results.push((step, step_result)); } @@ -648,9 +647,6 @@ pub fn calculate_proposed_transaction( min_target_height: BlockHeight, prior_step_results: &[(&proposal::Step, BuildResult)], proposal_step: &proposal::Step, - usk_to_tkey: Option< - fn(&UnifiedSpendingKey, &TransparentAddressMetadata) -> hdwallet::secp256k1::SecretKey, - >, override_sapling_change_address: Option, ) -> Result< BuildResult, @@ -830,16 +826,10 @@ where .clone() .ok_or_else(|| Error::NoSpendingKey(addr.encode(params)))?; - let secret_key = usk_to_tkey - .map(|f| f(usk, &address_metadata)) - .unwrap_or_else(|| { - usk.transparent() - .derive_secret_key( - address_metadata.scope(), - address_metadata.address_index(), - ) - .unwrap() - }); + let secret_key = usk + .transparent() + .derive_secret_key(address_metadata.scope(), address_metadata.address_index()) + .unwrap(); utxos_spent.push(outpoint.clone()); builder.add_transparent_input(secret_key, outpoint, utxo)?;