From 89bbccb09cbb29dd4b1f6a8c7ef3be137da4b243 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Sat, 4 Feb 2017 15:15:50 -0800 Subject: Stop removing old shapeshift txs --- app/scripts/lib/controllers/shapeshift.js | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'app') diff --git a/app/scripts/lib/controllers/shapeshift.js b/app/scripts/lib/controllers/shapeshift.js index fbdc2c180..3d955c01f 100644 --- a/app/scripts/lib/controllers/shapeshift.js +++ b/app/scripts/lib/controllers/shapeshift.js @@ -4,9 +4,6 @@ const extend = require('xtend') // every three seconds when an incomplete tx is waiting const POLLING_INTERVAL = 3000 -// drop txs that haven't been paid to in 11 mins -const TIMEOUT_LIMIT = 660000 - class ShapeshiftController { constructor (opts = {}) { @@ -27,24 +24,11 @@ class ShapeshiftController { } getPendingTxs () { - this.removeOldTxs() const txs = this.getShapeShiftTxList() const pending = txs.filter(tx => tx.response && tx.response.status !== 'complete') return pending } - removeOldTxs() { - const { shapeShiftTxList } = this.store.getState() - const now = new Date().getTime() - const old = shapeShiftTxList.find((tx) => { - return tx.time + TIMEOUT_LIMIT < now && - tx.response && tx.response.status === 'no_deposits' - }) - if (old) { - old.forEach(tx => this.removeShapeShiftTx(tx)) - } - } - pollForUpdates () { const pendingTxs = this.getPendingTxs() -- cgit v1.2.3