From 89fe8d36cc34e141d50ae1e1d123af90db6a6cac Mon Sep 17 00:00:00 2001 From: Cryptoforge Date: Mon, 12 Oct 2020 20:37:11 -0700 Subject: [PATCH] fix spend from single zaddress --- lib/src/lightwallet.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/src/lightwallet.rs b/lib/src/lightwallet.rs index 750f26b..912cd86 100644 --- a/lib/src/lightwallet.rs +++ b/lib/src/lightwallet.rs @@ -2080,7 +2080,12 @@ impl LightWallet { let extsk = self.zkeys.read().unwrap().iter() .find(|zk| zk.extfvk == note.extfvk) .and_then(|zk| zk.extsk.clone()); - SpendableNote::from(txid, note, anchor_offset, &extsk) + //filter only on Notes with a matching from address + if from == LightWallet::note_address(self.config.hrp_sapling_address(), note).unwrap() { + SpendableNote::from(txid, note, anchor_offset, &extsk) + } else { + None + } } }).collect();