Merge branch 'master' into split
This commit is contained in:
commit
3c7ba5045d
@ -31,6 +31,10 @@ export default class Account {
|
||||
}
|
||||
|
||||
isValidPassword (password) {
|
||||
if (!this._keyObject) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return decryptPrivateKey(this._keyObject, password)
|
||||
.then((privateKey) => {
|
||||
if (!privateKey) {
|
||||
|
@ -168,6 +168,12 @@ export default class Accounts {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!account.uuid) {
|
||||
this.removeUnsafe(address);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return account
|
||||
.isValidPassword(password)
|
||||
.then((isValid) => {
|
||||
|
@ -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);
|
||||
|
||||
|
@ -373,10 +373,6 @@ class Accounts extends Component {
|
||||
}
|
||||
|
||||
renderNewWalletButton () {
|
||||
if (this.props.availability !== 'personal') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Button
|
||||
key='newWallet'
|
||||
|
Loading…
Reference in New Issue
Block a user