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:
Jaco Greeff
2017-02-03 13:54:53 +01:00
committed by Gav Wood
parent 3af45c6ad9
commit acf41d6f27
13 changed files with 115 additions and 172 deletions

View File

@@ -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);
});
});
}