Get wallet encryption status

This commit is contained in:
Aditya Kulkarni
2019-10-30 13:52:13 -07:00
parent 25c1e35192
commit 0a1f672ebc
2 changed files with 50 additions and 21 deletions

View File

@@ -639,6 +639,14 @@ impl LightClient {
res
}
pub fn do_encryption_status(&self) -> JsonValue {
let wallet = self.wallet.read().unwrap();
object!{
"encrypted" => wallet.is_encrypted(),
"locked" => !wallet.is_unlocked_for_spending()
}
}
pub fn do_list_transactions(&self) -> JsonValue {
let wallet = self.wallet.read().unwrap();