aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/config-manager.js
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-08-17 06:11:40 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-08-17 06:11:40 +0800
commit666f3cd66ce56013e5688d514e3c1fc3ec8a6ac4 (patch)
treeae8f2a3a805e0ac24ed3d1058138cf1b3c25b763 /app/scripts/lib/config-manager.js
parent121af0c4b9fd12e9960cbf5bbb3203819b854eb7 (diff)
downloadtangerine-wallet-browser-666f3cd66ce56013e5688d514e3c1fc3ec8a6ac4.tar
tangerine-wallet-browser-666f3cd66ce56013e5688d514e3c1fc3ec8a6ac4.tar.gz
tangerine-wallet-browser-666f3cd66ce56013e5688d514e3c1fc3ec8a6ac4.tar.bz2
tangerine-wallet-browser-666f3cd66ce56013e5688d514e3c1fc3ec8a6ac4.tar.lz
tangerine-wallet-browser-666f3cd66ce56013e5688d514e3c1fc3ec8a6ac4.tar.xz
tangerine-wallet-browser-666f3cd66ce56013e5688d514e3c1fc3ec8a6ac4.tar.zst
tangerine-wallet-browser-666f3cd66ce56013e5688d514e3c1fc3ec8a6ac4.zip
Added compliance for tests and properly accounts for N/A conversions.
Diffstat (limited to 'app/scripts/lib/config-manager.js')
-rw-r--r--app/scripts/lib/config-manager.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js
index 44617f0ed..c56f52e48 100644
--- a/app/scripts/lib/config-manager.js
+++ b/app/scripts/lib/config-manager.js
@@ -291,7 +291,7 @@ ConfigManager.prototype.updateConversionRate = function () {
this.setConversionDate(parsedResponse.timestamp)
}).catch((err) => {
console.error('Error in conversion.', err)
- this.setConversionPrice('N/A')
+ this.setConversionPrice(0)
this.setConversionDate('N/A')
})
}
@@ -310,12 +310,12 @@ ConfigManager.prototype.setConversionDate = function (datestring) {
ConfigManager.prototype.getConversionRate = function () {
var data = this.getData()
- return ('conversionRate' in data) && data.conversionRate
+ return (('conversionRate' in data) && data.conversionRate) || 0
}
ConfigManager.prototype.getConversionDate = function () {
var data = this.getData()
- return ('conversionDate' in data) && data.conversionDate
+ return (('conversionDate' in data) && data.conversionDate) || 'N/A'
}
ConfigManager.prototype.setShouldntShowWarning = function () {