aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-08-23 06:03:36 +0800
committerDan Finlay <dan@danfinlay.com>2016-08-23 06:03:36 +0800
commit6e1000f361afcf259beb587d777f3025fcde7667 (patch)
tree758ddcf89896b8c7976347e9e2c97226378e05a6 /app/scripts/lib
parent270dbacbc472dae660fe8b143df9c64b7f8279cf (diff)
parent3756384da6cb7d1566271cb99ec561d3b051a4ac (diff)
downloadtangerine-wallet-browser-6e1000f361afcf259beb587d777f3025fcde7667.tar.gz
tangerine-wallet-browser-6e1000f361afcf259beb587d777f3025fcde7667.tar.zst
tangerine-wallet-browser-6e1000f361afcf259beb587d777f3025fcde7667.zip
Merge branch 'master' into PopupNotifications
Diffstat (limited to 'app/scripts/lib')
-rw-r--r--app/scripts/lib/config-manager.js35
-rw-r--r--app/scripts/lib/idStore.js1
2 files changed, 36 insertions, 0 deletions
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js
index c56f52e48..6f5cb3a4a 100644
--- a/app/scripts/lib/config-manager.js
+++ b/app/scripts/lib/config-manager.js
@@ -332,3 +332,38 @@ ConfigManager.prototype.getShouldntShowWarning = function () {
var data = this.getData()
return ('isEthConfirmed' in data) && data.isEthConfirmed
}
+
+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)
+}
+
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js
index 3272f2d1a..7ac71e409 100644
--- a/app/scripts/lib/idStore.js
+++ b/app/scripts/lib/idStore.js
@@ -100,6 +100,7 @@ IdentityStore.prototype.getState = function () {
unconfMsgs: messageManager.unconfirmedMsgs(),
messages: messageManager.getMsgList(),
selectedAddress: configManager.getSelectedAccount(),
+ shapeShiftTxList: configManager.getShapeShiftTxList(),
currentFiat: configManager.getCurrentFiat(),
conversionRate: configManager.getConversionRate(),
conversionDate: configManager.getConversionDate(),
s-gnome/commit/multimedia/mjpegtools?h=mate-1.16&id=8b3ca81a6b33717b677559e139ebe0921d7541fb'>BROKEN on 5.x: does not compilekris2004-02-181-0/+4 * USE_SIZEifylioux2004-02-082-0/+2 * Bump PORTREVISION on all ports that depend on gettext to aid with upgrading.marcus2004-02-041-0/+1 * Fix for libtool new world orderade2003-06-291-1/+1 * Unmark BROKEN by fixing PLIST. According to bento logs, the errorlioux2003-05-112-3/+4 * BROKEN: Does not compilekris2003-05-071-0/+2 * Fix build when WITH_QUICKTIME is enabledlioux2003-04-281-0/+3 * Remove USE_GNOMENG.marcus2003-04-211-1/+0 * Improve libgnugetopt handling: use OSVERSION variable to handlelioux2003-04-191-5/+2 * Switch to new USE_GETOPT_LONG ports optionlioux2003-04-181-1/+4 * De-pkg-commentlioux2003-02-242-1/+1 * Update to 1.6.1lioux2003-01-173-6/+9 * Chase libdv library version bump in version 0.9.9lioux2003-01-171-2/+2 * devel/sdl12 has been upgraded to shlib version 5.edwin2003-01-071-1/+1 * Update version number of SDL shared library.sobomax2003-01-021-1/+1 * Fix breakage if libgnugetopt is installed prior to building thislioux2002-12-221-0/+16 * After repo copy from graphics category, update all appropriatelioux2002-11-281-5/+5 * Chase libdv -ldv.2 library bump. Forgotten in LIB_DEPENDS line.lioux2002-09-261-1/+1 * libtool patch to improve chances that this port builds in somelioux2002-09-201-0/+10 * Chase library version bump in libdv version 0.9.8lioux2002-09-051-1/+1 * Fix buildlioux2002-09-041-1/+7 * o Fix build in -STABLE (USE_LIBTOOL fix)lioux2002-07-182-10/+12 * Complete USE_GLIB-->USE_GNOMENG+USE_GNOME transition.sobomax2002-07-161-5/+5 * Convert USE_GLIB into USE_GNOMENG+USE_GNOME.sobomax2002-07-161-1/+2 * USE_REINPLACElioux2002-07-041-6/+7 * Chase lib version from avifile version 0.7.7.20020523lioux2002-06-261-1/+1 * o Add AVI support which incidently means both DiVX ;-) and DiVX4lioux2002-06-082-2/+12