aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-02-05 07:15:50 +0800
committerDan Finlay <dan@danfinlay.com>2017-02-05 07:15:50 +0800
commit89bbccb09cbb29dd4b1f6a8c7ef3be137da4b243 (patch)
treefcdf2d5e569c59c738ac73094395515472d15a33 /app/scripts
parentaf439cc6cf10fa0387f7e2196d5fefaf84f2f0a2 (diff)
downloadtangerine-wallet-browser-89bbccb09cbb29dd4b1f6a8c7ef3be137da4b243.tar
tangerine-wallet-browser-89bbccb09cbb29dd4b1f6a8c7ef3be137da4b243.tar.gz
tangerine-wallet-browser-89bbccb09cbb29dd4b1f6a8c7ef3be137da4b243.tar.bz2
tangerine-wallet-browser-89bbccb09cbb29dd4b1f6a8c7ef3be137da4b243.tar.lz
tangerine-wallet-browser-89bbccb09cbb29dd4b1f6a8c7ef3be137da4b243.tar.xz
tangerine-wallet-browser-89bbccb09cbb29dd4b1f6a8c7ef3be137da4b243.tar.zst
tangerine-wallet-browser-89bbccb09cbb29dd4b1f6a8c7ef3be137da4b243.zip
Stop removing old shapeshift txs
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/lib/controllers/shapeshift.js16
1 files changed, 0 insertions, 16 deletions
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()