diff --git a/zingolib/src/wallet/keys/unified.rs b/zingolib/src/wallet/keys/unified.rs index b73b54934d..65119e475f 100644 --- a/zingolib/src/wallet/keys/unified.rs +++ b/zingolib/src/wallet/keys/unified.rs @@ -205,7 +205,7 @@ impl WalletCapability { }; // produce a Sapling address to increment Sapling diversifier index - let sapling_address = if self.sapling.can_view() { + let sapling_receiver = if desired_receivers.sapling && self.sapling.can_view() { let mut sapling_diversifier_index = DiversifierIndex::new(); let mut address; let mut count = 0; @@ -218,7 +218,6 @@ impl WalletCapability { sapling_diversifier_index .increment() .expect("diversifier index overflow"); - dbg!(count); if count == self.addresses.len() { break; } @@ -228,11 +227,6 @@ impl WalletCapability { } else { None }; - let sapling_receiver = if desired_receivers.sapling { - sapling_address - } else { - None - }; let transparent_receiver = if desired_receivers.transparent { let child_index = KeyIndex::from_index(self.addresses.len() as u32).unwrap();