Merge pull request #6196 from paritytech/mh-pubnode-extacc
Re-enable wallets, fixed forgetting accounts
This commit is contained in:
commit
46126b5fb6
@ -31,6 +31,10 @@ export default class Account {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isValidPassword (password) {
|
isValidPassword (password) {
|
||||||
|
if (!this._keyObject) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return decryptPrivateKey(this._keyObject, password)
|
return decryptPrivateKey(this._keyObject, password)
|
||||||
.then((privateKey) => {
|
.then((privateKey) => {
|
||||||
if (!privateKey) {
|
if (!privateKey) {
|
||||||
|
@ -168,6 +168,12 @@ export default class Accounts {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!account.uuid) {
|
||||||
|
this.removeUnsafe(address);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return account
|
return account
|
||||||
.isValidPassword(password)
|
.isValidPassword(password)
|
||||||
.then((isValid) => {
|
.then((isValid) => {
|
||||||
|
@ -206,6 +206,10 @@ export default class LocalAccountsMiddleware extends Middleware {
|
|||||||
return accounts.remove(address, password);
|
return accounts.remove(address, password);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
register('parity_removeAddress', ([address]) => {
|
||||||
|
return accounts.remove(address, null);
|
||||||
|
});
|
||||||
|
|
||||||
register('parity_testPassword', ([address, password]) => {
|
register('parity_testPassword', ([address, password]) => {
|
||||||
const account = accounts.get(address);
|
const account = accounts.get(address);
|
||||||
|
|
||||||
|
@ -373,10 +373,6 @@ class Accounts extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderNewWalletButton () {
|
renderNewWalletButton () {
|
||||||
if (this.props.availability !== 'personal') {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
key='newWallet'
|
key='newWallet'
|
||||||
|
Loading…
Reference in New Issue
Block a user