dont store any info for sietch zaddr

This commit is contained in:
DenioD
2020-01-06 21:38:49 +01:00
parent 1db9c3198b
commit 0ae0994978
2 changed files with 17 additions and 1 deletions

View File

@@ -458,6 +458,22 @@ impl LightWallet {
self.extfvks.write().unwrap().push(extfvk);
self.zaddress.write().unwrap().push(address);
zaddr
}
pub fn add_zaddrdust(&self) -> String {
if !self.unlocked {
return "".to_string();
}
let pos = self.extsks.read().unwrap().len() as u32;
let bip39_seed = bip39::Seed::new(&Mnemonic::from_entropy(&self.seed, Language::English).unwrap(), "");
let (_extsk, _extfvk, address) =
LightWallet::get_zaddr_from_bip39seed(&self.config, &bip39_seed.as_bytes(), pos);
let zaddr = encode_payment_address(self.config.hrp_sapling_address(), &address);
zaddr
}