From 901eeb5c102dbd8e42d5835e4d35c10fe0301086 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Fri, 3 Feb 2017 21:39:22 -0800 Subject: Fix bug when clearing old shapeshift txs --- app/scripts/lib/controllers/shapeshift.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/scripts/lib/controllers/shapeshift.js b/app/scripts/lib/controllers/shapeshift.js index 6d1c95323..ec27b37a0 100644 --- a/app/scripts/lib/controllers/shapeshift.js +++ b/app/scripts/lib/controllers/shapeshift.js @@ -39,7 +39,9 @@ class ShapeshiftController { const old = shapeShiftTxList.find((tx) => { return tx.time + TIMEOUT_LIMIT < now }) - old.forEach(tx => this.removeShapeShiftTx(tx)) + if (old) { + old.forEach(tx => this.removeShapeShiftTx(tx)) + } } pollForUpdates () { -- cgit