aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/config-manager.js10
-rw-r--r--app/scripts/metamask-controller.js5
2 files changed, 8 insertions, 7 deletions
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js
index d6d10c8f2..6f5cb3a4a 100644
--- a/app/scripts/lib/config-manager.js
+++ b/app/scripts/lib/config-manager.js
@@ -337,11 +337,11 @@ ConfigManager.prototype.getShapeShiftTxList = function () {
var data = this.getData()
var shapeShiftTxList = data.shapeShiftTxList ? data.shapeShiftTxList : []
shapeShiftTxList.forEach((tx) => {
- if (tx.response.status !== 'complete'){
+ if (tx.response.status !== 'complete') {
var requestListner = function (request) {
tx.response = JSON.parse(this.responseText)
- if (tx.status === 'complete') {
- tx.completeTime = new Date().getTime()
+ if (tx.response.status === 'complete') {
+ tx.time = new Date().getTime()
}
}
@@ -351,6 +351,7 @@ ConfigManager.prototype.getShapeShiftTxList = function () {
shapShiftReq.send()
}
})
+ this.setData(data)
return shapeShiftTxList
}
@@ -358,10 +359,11 @@ ConfigManager.prototype.createShapeShiftTx = function (depositAddress, depositTy
var data = this.getData()
var shapeShiftTx = {depositAddress, depositType, key: 'shapeshift', time: new Date().getTime(), response: {}}
- if(!data.shapeShiftTxList) {
+ if (!data.shapeShiftTxList) {
data.shapeShiftTxList = [shapeShiftTx]
} else {
data.shapeShiftTxList.push(shapeShiftTx)
}
this.setData(data)
}
+
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 0b1d40148..218f1f72a 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -65,7 +65,7 @@ module.exports = class MetamaskController {
// coinbase
buyEth: this.buyEth.bind(this),
// shapeshift
- createShapeShiftTx : this.createShapeShiftTx.bind(this),
+ createShapeShiftTx: this.createShapeShiftTx.bind(this),
}
}
@@ -319,10 +319,9 @@ module.exports = class MetamaskController {
})
}
- createShapeShiftTx (depositAddress, depositType) {
+ createShapeShiftTx (depositAddress, depositType) {
this.configManager.createShapeShiftTx(depositAddress, depositType)
}
-
}
function noop () {}