From d5373e26b884d8bcd23a7eaced104dff231f8eb9 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 1 Dec 2016 13:36:23 +0100 Subject: [PATCH 1/3] Filter null transactions (not available on node) --- js/src/ui/TxList/store.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/src/ui/TxList/store.js b/js/src/ui/TxList/store.js index ab35d5468..3faac193e 100644 --- a/js/src/ui/TxList/store.js +++ b/js/src/ui/TxList/store.js @@ -92,7 +92,9 @@ export default class Store { Promise .all(txhashes.map((txhash) => this._api.eth.getTransactionByHash(txhash))) - .then((transactions) => { + .then((_transactions) => { + const transactions = _transactions.filter((tx) => tx); + this.addTransactions( transactions.reduce((transactions, tx, index) => { transactions[txhashes[index]] = tx; From 077f32dce6ecfe822db14343f102c5d5c7907473 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 1 Dec 2016 13:39:38 +0100 Subject: [PATCH 2/3] Cater for completely empty lists --- js/src/ui/TxList/store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/ui/TxList/store.js b/js/src/ui/TxList/store.js index 3faac193e..e2d339aa7 100644 --- a/js/src/ui/TxList/store.js +++ b/js/src/ui/TxList/store.js @@ -93,7 +93,7 @@ export default class Store { Promise .all(txhashes.map((txhash) => this._api.eth.getTransactionByHash(txhash))) .then((_transactions) => { - const transactions = _transactions.filter((tx) => tx); + const transactions = _transactions.filter((tx) => tx) || []; this.addTransactions( transactions.reduce((transactions, tx, index) => { From 9087560344a828e343b654d8051eb5d7017de060 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 1 Dec 2016 14:08:32 +0100 Subject: [PATCH 3/3] gumbles --- js/src/ui/TxList/store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/ui/TxList/store.js b/js/src/ui/TxList/store.js index e2d339aa7..3faac193e 100644 --- a/js/src/ui/TxList/store.js +++ b/js/src/ui/TxList/store.js @@ -93,7 +93,7 @@ export default class Store { Promise .all(txhashes.map((txhash) => this._api.eth.getTransactionByHash(txhash))) .then((_transactions) => { - const transactions = _transactions.filter((tx) => tx) || []; + const transactions = _transactions.filter((tx) => tx); this.addTransactions( transactions.reduce((transactions, tx, index) => {