Use trace API for decentralized transaction list (#2784)
* Using traces when available to get accounts transactions (#2148) * Fixed traceMode detection and transactions rendering (#2148) * [WIP] Use Redux Thunk in main UI => Async Actions (#2148) * Using Redux for Transaction / Block / Methods... (#2148) * Use BigNumber comparedTo function to sort txs (#2148)
This commit is contained in:
committed by
Jaco Greeff
parent
479657b23b
commit
76cded7fa4
@@ -141,3 +141,24 @@ export function inOptions (options) {
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
export function inTraceFilter (filterObject) {
|
||||
if (filterObject) {
|
||||
Object.keys(filterObject).forEach((key) => {
|
||||
switch (key) {
|
||||
case 'fromAddress':
|
||||
case 'toAddress':
|
||||
filterObject[key] = [].concat(filterObject[key])
|
||||
.map(address => inAddress(address));
|
||||
break;
|
||||
|
||||
case 'toBlock':
|
||||
case 'fromBlock':
|
||||
filterObject[key] = inBlockNumber(filterObject[key]);
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return filterObject;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user