Merge branch 'master' into split

This commit is contained in:
debris 2017-07-31 19:40:33 +02:00
commit 3c7ba5045d
4 changed files with 14 additions and 4 deletions

View File

@ -31,6 +31,10 @@ export default class Account {
}
isValidPassword (password) {
if (!this._keyObject) {
return false;
}
return decryptPrivateKey(this._keyObject, password)
.then((privateKey) => {
if (!privateKey) {

View File

@ -168,6 +168,12 @@ export default class Accounts {
return false;
}
if (!account.uuid) {
this.removeUnsafe(address);
return true;
}
return account
.isValidPassword(password)
.then((isValid) => {

View File

@ -206,6 +206,10 @@ export default class LocalAccountsMiddleware extends Middleware {
return accounts.remove(address, password);
});
register('parity_removeAddress', ([address]) => {
return accounts.remove(address, null);
});
register('parity_testPassword', ([address, password]) => {
const account = accounts.get(address);

View File

@ -373,10 +373,6 @@ class Accounts extends Component {
}
renderNewWalletButton () {
if (this.props.availability !== 'personal') {
return null;
}
return (
<Button
key='newWallet'