Relock unlocked accounts after first use (#1120)

* Add `SecretStore::unlock_account_temp` function.

* Test for relocking accounts.
This commit is contained in:
Gav Wood
2016-05-21 22:23:16 +02:00
parent 9f84326ca7
commit b53d0050dd
3 changed files with 77 additions and 18 deletions

View File

@@ -60,7 +60,7 @@ impl<A> Personal for PersonalClient<A> where A: AccountProvider + 'static {
from_params::<(Address, String, u64)>(params).and_then(
|(account, account_pass, _)|{
let store = take_weak!(self.accounts);
match store.unlock_account(&account, &account_pass) {
match store.unlock_account_temp(&account, &account_pass) {
Ok(_) => Ok(Value::Bool(true)),
Err(_) => Ok(Value::Bool(false)),
}