aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-07-23 02:15:47 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-07-23 02:15:47 +0800
commit86832e6feb502a3f1de24b81b111addf1f06bea6 (patch)
tree8f3ac5ce8c1772916d93cf79e7fd7336e3b6a7bc /app/scripts/lib
parent22528002e1edef84ade67d5bc30b2580e6542c05 (diff)
parent0bbfedc2bf21d8c3eec17fef35e93a98a946469e (diff)
downloadtangerine-wallet-browser-86832e6feb502a3f1de24b81b111addf1f06bea6.tar
tangerine-wallet-browser-86832e6feb502a3f1de24b81b111addf1f06bea6.tar.gz
tangerine-wallet-browser-86832e6feb502a3f1de24b81b111addf1f06bea6.tar.bz2
tangerine-wallet-browser-86832e6feb502a3f1de24b81b111addf1f06bea6.tar.lz
tangerine-wallet-browser-86832e6feb502a3f1de24b81b111addf1f06bea6.tar.xz
tangerine-wallet-browser-86832e6feb502a3f1de24b81b111addf1f06bea6.tar.zst
tangerine-wallet-browser-86832e6feb502a3f1de24b81b111addf1f06bea6.zip
Fix merge conflicts. Fix typos. Ensure currency immediately updated on load.
Diffstat (limited to 'app/scripts/lib')
-rw-r--r--app/scripts/lib/config-manager.js17
-rw-r--r--app/scripts/lib/idStore.js1
2 files changed, 18 insertions, 0 deletions
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js
index e0f389ed4..8d250e555 100644
--- a/app/scripts/lib/config-manager.js
+++ b/app/scripts/lib/config-manager.js
@@ -289,6 +289,12 @@ ConfigManager.prototype.updateConversionRate = function () {
const parsedResponse = JSON.parse(response)
this.setConversionPrice(parsedResponse.ticker.price)
this.setConversionDate(parsedResponse.timestamp)
+ console.log('=================')
+ console.log('Updated currency!')
+ console.log('=================')
+ console.log(this.getConversionRate())
+ console.log(this.getCurrentFiat())
+ console.log(parsedResponse)
}).catch((err) => {
console.error('Error in conversion.', err)
})
@@ -315,3 +321,14 @@ ConfigManager.prototype.getConversionDate = function () {
var data = this.getData()
return ('conversionDate' in data) && data.conversionDate
}
+
+ConfigManager.prototype.setShouldntShowWarning = function (confirmed) {
+ var data = this.getData()
+ data.isEthConfirmed = confirmed
+ this.setData(data)
+}
+
+ConfigManager.prototype.getShouldntShowWarning = function () {
+ var data = this.getData()
+ return ('isEthConfirmed' in data) && data.isEthConfirmed
+}
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js
index b6c136b8f..9d8012d54 100644
--- a/app/scripts/lib/idStore.js
+++ b/app/scripts/lib/idStore.js
@@ -94,6 +94,7 @@ IdentityStore.prototype.getState = function () {
isUnlocked: this._isUnlocked(),
seedWords: seedWords,
isConfirmed: configManager.getConfirmed(),
+ isEthConfirmed: configManager.getShouldntShowWarning(),
unconfTxs: configManager.unconfirmedTxs(),
transactions: configManager.getTxList(),
unconfMsgs: messageManager.unconfirmedMsgs(),