diff --git a/js/src/dapps/basiccoin/Application/application.js b/js/src/dapps/basiccoin/Application/application.js index 1e268e720..d84085c98 100644 --- a/js/src/dapps/basiccoin/Application/application.js +++ b/js/src/dapps/basiccoin/Application/application.js @@ -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,9 +83,10 @@ export default class Application extends Component { Promise .all([ attachInstances(), - api.personal.accountsInfo() + null // api.personal.accountsInfo() ]) .then(([{ managerInstance, registryInstance, tokenregInstance }, accountsInfo]) => { + accountsInfo = accountsInfo || {}; this.setState({ loading: false, managerInstance, diff --git a/js/src/dapps/gavcoin/Application/application.js b/js/src/dapps/gavcoin/Application/application.js index 04c5abe01..29c86c78d 100644 --- a/js/src/dapps/gavcoin/Application/application.js +++ b/js/src/dapps/gavcoin/Application/application.js @@ -205,11 +205,12 @@ export default class Application extends Component { return Promise .all([ registry.getAddress.call({}, [api.util.sha3('gavcoin'), 'A']), - api.personal.listAccounts(), - api.personal.accountsInfo() + api.eth.accounts(), + null // api.personal.accountsInfo() ]); }) .then(([address, addresses, infos]) => { + infos = infos || {}; console.log(`gavcoin was found at ${address}`); const contract = api.newContract(abis.gavcoin, address); @@ -220,11 +221,11 @@ export default class Application extends Component { contract, instance: contract.instance, accounts: addresses.map((address) => { - const info = infos[address]; + const info = infos[address] || {}; return { address, - name: info.name || 'Unnamed', + name: info.name, uuid: info.uuid }; }) diff --git a/js/src/dapps/gavcoin/Events/Event/event.js b/js/src/dapps/gavcoin/Events/Event/event.js index 4fb29a382..0b4094ac0 100644 --- a/js/src/dapps/gavcoin/Events/Event/event.js +++ b/js/src/dapps/gavcoin/Events/Event/event.js @@ -80,7 +80,7 @@ export default class Event extends Component { const { accounts } = this.context; const account = accounts.find((_account) => _account.address === address); - if (account) { + if (account && account.name) { return (
{ shortenHash ? renderHash(address) : address }
);
}
diff --git a/js/src/dapps/signaturereg/services.js b/js/src/dapps/signaturereg/services.js
index 3963d394c..3942f75cc 100644
--- a/js/src/dapps/signaturereg/services.js
+++ b/js/src/dapps/signaturereg/services.js
@@ -46,16 +46,17 @@ export function attachInterface (callback) {
return Promise
.all([
registry.getAddress.call({}, [api.util.sha3('signaturereg'), 'A']),
- api.personal.listAccounts(),
- api.personal.accountsInfo()
+ api.eth.accounts(),
+ null // api.personal.accountsInfo()
]);
})
.then(([address, addresses, accountsInfo]) => {
+ accountsInfo = accountsInfo || {};
console.log(`signaturereg was found at ${address}`);
const contract = api.newContract(abis.signaturereg, address);
const accounts = addresses.reduce((obj, address) => {
- const info = accountsInfo[address];
+ const info = accountsInfo[address] || {};
return Object.assign(obj, {
[address]: {
diff --git a/js/src/dapps/tokenreg/Accounts/actions.js b/js/src/dapps/tokenreg/Accounts/actions.js
index 2e597f2e5..f093b5300 100644
--- a/js/src/dapps/tokenreg/Accounts/actions.js
+++ b/js/src/dapps/tokenreg/Accounts/actions.js
@@ -37,11 +37,11 @@ export const setSelectedAccount = (address) => ({
export const loadAccounts = () => (dispatch) => {
Promise
.all([
- api.personal.listAccounts(),
- api.personal.accountsInfo()
+ api.eth.accounts(),
+ null // api.personal.accountsInfo()
])
- .then(results => {
- const [ accounts, accountsInfo ] = results;
+ .then(([ accounts, accountsInfo ]) => {
+ accountsInfo = accountsInfo || {};
const accountsList = accounts
.map(address => ({
diff --git a/js/src/dapps/tokenreg/Status/actions.js b/js/src/dapps/tokenreg/Status/actions.js
index a479179b2..9ec196aed 100644
--- a/js/src/dapps/tokenreg/Status/actions.js
+++ b/js/src/dapps/tokenreg/Status/actions.js
@@ -82,7 +82,7 @@ export const loadContractDetails = () => (dispatch, getState) => {
Promise
.all([
- api.personal.listAccounts(),
+ api.eth.accounts(),
instance.owner.call(),
instance.fee.call()
])