Remove personal_* calls from dapps (#2860)

* remove accountsInfo & listAccounts

* registry accounts selector works
This commit is contained in:
Jaco Greeff
2016-10-25 15:15:22 +02:00
committed by Gav Wood
parent b6f2628018
commit 4fc1c5f42e
9 changed files with 30 additions and 29 deletions

View File

@@ -28,21 +28,22 @@ export function attachInterface () {
return Promise
.all([
registry.getAddress.call({}, [api.util.sha3('githubhint'), 'A']),
api.personal.listAccounts(),
api.personal.accountsInfo()
api.eth.accounts(),
null // api.personal.accountsInfo()
]);
})
.then(([address, addresses, accountsInfo]) => {
accountsInfo = accountsInfo || {};
console.log(`githubhint was found at ${address}`);
const contract = api.newContract(abis.githubhint, address);
const accounts = addresses.reduce((obj, address) => {
const info = accountsInfo[address];
const info = accountsInfo[address] || {};
return Object.assign(obj, {
[address]: {
address,
name: info.name || 'Unnamed',
name: info.name,
uuid: info.uuid
}
});