aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/config-manager.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-02-04 12:45:20 +0800
committerDan Finlay <dan@danfinlay.com>2017-02-04 12:45:20 +0800
commit13ee92909cce93b37eec2092757e4aab174a970e (patch)
tree40802425ce3731679b0c877168ca9e9ee067dd9d /app/scripts/lib/config-manager.js
parent24ff38e97386eafe0cd9c8e4e77dbed856b2464e (diff)
downloadtangerine-wallet-browser-13ee92909cce93b37eec2092757e4aab174a970e.tar.gz
tangerine-wallet-browser-13ee92909cce93b37eec2092757e4aab174a970e.tar.zst
tangerine-wallet-browser-13ee92909cce93b37eec2092757e4aab174a970e.zip
Mostly got shapeshift tx management into its own controller
Rendering the list is still having issues, so this isn't done yet.
Diffstat (limited to 'app/scripts/lib/config-manager.js')
-rw-r--r--app/scripts/lib/config-manager.js34
1 files changed, 0 insertions, 34 deletions
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js
index a9b86ca8c..7ae2d4400 100644
--- a/app/scripts/lib/config-manager.js
+++ b/app/scripts/lib/config-manager.js
@@ -250,40 +250,6 @@ ConfigManager.prototype.getTOSHash = function () {
return data.TOSHash
}
-ConfigManager.prototype.getShapeShiftTxList = function () {
- var data = this.getData()
- var shapeShiftTxList = data.shapeShiftTxList ? data.shapeShiftTxList : []
- shapeShiftTxList.forEach((tx) => {
- if (tx.response.status !== 'complete') {
- var requestListner = function (request) {
- tx.response = JSON.parse(this.responseText)
- if (tx.response.status === 'complete') {
- tx.time = new Date().getTime()
- }
- }
-
- var shapShiftReq = new XMLHttpRequest()
- shapShiftReq.addEventListener('load', requestListner)
- shapShiftReq.open('GET', `https://shapeshift.io/txStat/${tx.depositAddress}`, true)
- shapShiftReq.send()
- }
- })
- this.setData(data)
- return shapeShiftTxList
-}
-
-ConfigManager.prototype.createShapeShiftTx = function (depositAddress, depositType) {
- var data = this.getData()
-
- var shapeShiftTx = {depositAddress, depositType, key: 'shapeshift', time: new Date().getTime(), response: {}}
- if (!data.shapeShiftTxList) {
- data.shapeShiftTxList = [shapeShiftTx]
- } else {
- data.shapeShiftTxList.push(shapeShiftTx)
- }
- this.setData(data)
-}
-
ConfigManager.prototype.getGasMultiplier = function () {
var data = this.getData()
return data.gasMultiplier