wallet: change password
This commit is contained in:
parent
e86cba50ca
commit
b97cfb5d68
1 changed files with 8 additions and 0 deletions
|
@ -302,6 +302,14 @@ impl Wallet {
|
||||||
let r_data = self.data.read().unwrap();
|
let r_data = self.data.read().unwrap();
|
||||||
r_data.clone()
|
r_data.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Change wallet password.
|
||||||
|
pub fn change_password(&self, old: String, new: String) -> Result<(), Error> {
|
||||||
|
let instance = self.instance.clone().unwrap();
|
||||||
|
let mut wallet_lock = instance.lock();
|
||||||
|
let lc = wallet_lock.lc_provider()?;
|
||||||
|
lc.change_password(None, ZeroingString::from(old), ZeroingString::from(new))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Delay in seconds to update wallet data every minute as average block time.
|
/// Delay in seconds to update wallet data every minute as average block time.
|
Loading…
Reference in a new issue