Limiting accounts returned by parity_accountInfo (#3931)

* Limiting accountNames returned by parity_accountNames

* Fixing middleware

* Change RPC interface

* Enhance tests for RPC layer

* UI uses parity_allAccountsInfo

* Update dapps to use parity_accountsInfo

* Don't filter by uuid (deprecated)

* Consistency in calls

* Fix js tests (missed stub call)
This commit is contained in:
Tomasz Drwięga
2016-12-23 18:52:02 +01:00
committed by Gav Wood
parent 546246c56b
commit 27ba0e6922
26 changed files with 145 additions and 119 deletions

View File

@@ -19,19 +19,23 @@ import BigNumber from 'bignumber.js';
import { toChecksumAddress } from '../../abi/util/address';
export function outAccountInfo (infos) {
const ret = {};
return Object
.keys(infos)
.reduce((ret, _address) => {
const info = infos[_address];
const address = outAddress(_address);
Object.keys(infos).forEach((address) => {
const info = infos[address];
ret[address] = {
name: info.name
};
ret[outAddress(address)] = {
name: info.name,
uuid: info.uuid,
meta: JSON.parse(info.meta)
};
});
if (info.meta) {
ret[address].uuid = info.uuid;
ret[address].meta = JSON.parse(info.meta);
}
return ret;
return ret;
}, {});
}
export function outAddress (address) {