aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib
diff options
context:
space:
mode:
authorFrankie <frankie.pangilinan@consensys.net>2016-08-19 06:20:26 +0800
committerFrankie <frankie.pangilinan@consensys.net>2016-08-19 06:20:26 +0800
commit3525dc080110e7af1f9544e18b5646c87fb9ae95 (patch)
tree7e2dde7bf928ddec789ec849bb799070f89e455e /app/scripts/lib
parent23aeb1c5c1ee066a7b7603c7d6dec329cea3a7ba (diff)
downloadtangerine-wallet-browser-3525dc080110e7af1f9544e18b5646c87fb9ae95.tar.gz
tangerine-wallet-browser-3525dc080110e7af1f9544e18b5646c87fb9ae95.tar.zst
tangerine-wallet-browser-3525dc080110e7af1f9544e18b5646c87fb9ae95.zip
Create a ShapeShift tx in tx History
Diffstat (limited to 'app/scripts/lib')
-rw-r--r--app/scripts/lib/config-manager.js10
1 files changed, 6 insertions, 4 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)
}
+