Personal split (#2879)

* Split personal namespace into Safe and Unsafe part

* Re-add api.personal.accountsInfo() calls to dapps

* Removing listGethAccounts from safe personal
This commit is contained in:
Jaco Greeff
2016-10-27 19:26:34 +02:00
committed by Gav Wood
parent abb1da5f4b
commit 8dff4012a6
17 changed files with 276 additions and 199 deletions

View File

@@ -16,7 +16,7 @@
import React, { Component, PropTypes } from 'react';
// import { api } from '../parity';
import { api } from '../parity';
import { attachInstances } from '../services';
import Header from './Header';
@@ -83,7 +83,7 @@ export default class Application extends Component {
Promise
.all([
attachInstances(),
null // api.personal.accountsInfo()
api.personal.accountsInfo()
])
.then(([{ managerInstance, registryInstance, tokenregInstance }, accountsInfo]) => {
accountsInfo = accountsInfo || {};

View File

@@ -206,7 +206,7 @@ export default class Application extends Component {
.all([
registry.getAddress.call({}, [api.util.sha3('gavcoin'), 'A']),
api.eth.accounts(),
null // api.personal.accountsInfo()
api.personal.accountsInfo()
]);
})
.then(([address, addresses, infos]) => {

View File

@@ -29,7 +29,7 @@ export function attachInterface () {
.all([
registry.getAddress.call({}, [api.util.sha3('githubhint'), 'A']),
api.eth.accounts(),
null // api.personal.accountsInfo()
api.personal.accountsInfo()
]);
})
.then(([address, addresses, accountsInfo]) => {

View File

@@ -22,12 +22,16 @@ export const fetch = () => (dispatch) => {
return Promise
.all([
api.eth.accounts(),
null // api.personal.accountsInfo()
api.personal.accountsInfo()
])
.then(([ accounts, data ]) => {
const addresses = accounts.map((address) => {
return { address, isAccount: true };
});
data = data || {};
const addresses = Object.keys(data)
.filter((address) => data[address] && !data[address].meta.deleted)
.map((address) => ({
...data[address], address,
isAccount: accounts.includes(address)
}));
dispatch(set(addresses));
})
.catch((error) => {

View File

@@ -50,7 +50,7 @@ export function attachInterface (callback) {
.all([
registry.getAddress.call({}, [api.util.sha3('signaturereg'), 'A']),
api.eth.accounts(),
null // api.personal.accountsInfo()
api.personal.accountsInfo()
]);
})
.then(([address, addresses, accountsInfo]) => {

View File

@@ -38,7 +38,7 @@ export const loadAccounts = () => (dispatch) => {
Promise
.all([
api.eth.accounts(),
null // api.personal.accountsInfo()
api.personal.accountsInfo()
])
.then(([ accounts, accountsInfo ]) => {
accountsInfo = accountsInfo || {};