dont store any info for sietch zaddr
This commit is contained in:
@@ -877,7 +877,7 @@ impl LightClient {
|
|||||||
let wallet = self.wallet.write().unwrap();
|
let wallet = self.wallet.write().unwrap();
|
||||||
|
|
||||||
match addr_type {
|
match addr_type {
|
||||||
"zs" => wallet.add_zaddr(),
|
"zs" => wallet.add_zaddrdust(),
|
||||||
|
|
||||||
_ => {
|
_ => {
|
||||||
let e = format!("Unrecognized address type: {}", addr_type);
|
let e = format!("Unrecognized address type: {}", addr_type);
|
||||||
|
|||||||
@@ -458,6 +458,22 @@ impl LightWallet {
|
|||||||
self.extfvks.write().unwrap().push(extfvk);
|
self.extfvks.write().unwrap().push(extfvk);
|
||||||
self.zaddress.write().unwrap().push(address);
|
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
|
zaddr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user