From 5840bd1b645357f973d623d12024fb842ac18e08 Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Sun, 17 May 2020 17:39:02 +0200 Subject: [PATCH] fix zdust --- lib/src/lightclient.rs | 5 +---- lib/src/lightwallet.rs | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/src/lightclient.rs b/lib/src/lightclient.rs index 157c318..ed753b3 100644 --- a/lib/src/lightclient.rs +++ b/lib/src/lightclient.rs @@ -914,10 +914,7 @@ impl LightClient { } pub fn do_new_sietchaddress(&self, addr_type: &str) -> Result { - if !self.wallet.read().unwrap().is_unlocked_for_spending() { - error!("Wallet is locked"); - return Err("Wallet is locked".to_string()); - } + let new_address = { let wallet = self.wallet.write().unwrap(); diff --git a/lib/src/lightwallet.rs b/lib/src/lightwallet.rs index a8cd4c5..988c452 100644 --- a/lib/src/lightwallet.rs +++ b/lib/src/lightwallet.rs @@ -471,7 +471,7 @@ impl LightWallet { } // Add a new Sietch Addr. This will derive a new zdust address from the seed pub fn add_zaddrdust(&self) -> String { - + let pos = self.extsks.read().unwrap().len() as u32;