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:
@@ -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 || {};
|
||||
|
||||
@@ -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]) => {
|
||||
|
||||
@@ -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]) => {
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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]) => {
|
||||
|
||||
@@ -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 || {};
|
||||
|
||||
Reference in New Issue
Block a user