Pub sub blocks (#6139)
* fun start * playin * linting * cleanup kk 1 * cleanup kk 2 * package * oops * grumbles * lint * lint 2 * all-possible-cases * conflict resolution * conflict resolution * ready * lint * remove package-lock * Restart subscription on transport close. * Bring back the formatter. * Fix formatter.
This commit is contained in:
committed by
Tomasz Drwięga
parent
47f7366a5c
commit
56f46edab8
@@ -183,16 +183,17 @@ export default class Parity extends PubsubBase {
|
||||
|
||||
localTransactions (callback) {
|
||||
return this.addListener(this._api, 'parity_localTransactions', (error, transactions) => {
|
||||
error
|
||||
? callback(error)
|
||||
: callback(null, transactions => {
|
||||
Object.values(transactions)
|
||||
.filter(tx => tx.transaction)
|
||||
.map(tx => {
|
||||
tx.transaction = outTransaction(tx.transaction);
|
||||
});
|
||||
return transactions;
|
||||
if (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
Object.values(transactions)
|
||||
.filter(tx => tx.transaction)
|
||||
.map(tx => {
|
||||
tx.transaction = outTransaction(tx.transaction);
|
||||
});
|
||||
|
||||
callback(null, transactions);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user