Dapps use defaultAccount instead of own selectors (#4386)
* Remove account selection from GitHubHint * Fix naming * Update to match BasicCoin * BasicCoin defaultAddress * typo * method registry without selector * Update after manual tests * IdentityIcon for localtx * Fix non-secure personal subscriptions * Query defaultAccount for non-secure apps on send
This commit is contained in:
@@ -54,14 +54,20 @@ export default class Personal {
|
||||
}
|
||||
|
||||
_accountsInfo = () => {
|
||||
return Promise
|
||||
.all([
|
||||
this._api.parity.accountsInfo(),
|
||||
this._api.parity.allAccountsInfo()
|
||||
])
|
||||
.then(([info, allInfo]) => {
|
||||
return this._api.parity
|
||||
.accountsInfo()
|
||||
.then((info) => {
|
||||
this._updateSubscriptions('parity_accountsInfo', null, info);
|
||||
this._updateSubscriptions('parity_allAccountsInfo', null, allInfo);
|
||||
|
||||
return this._api.parity
|
||||
.allAccountsInfo()
|
||||
.catch(() => {
|
||||
// NOTE: This fails on non-secure APIs, swallow error
|
||||
return {};
|
||||
})
|
||||
.then((allInfo) => {
|
||||
this._updateSubscriptions('parity_allAccountsInfo', null, allInfo);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user