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:
Craig O'Connor
2017-09-01 06:23:41 -04:00
committed by Tomasz Drwięga
parent 47f7366a5c
commit 56f46edab8
6 changed files with 92 additions and 144 deletions

View File

@@ -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);
});
}