diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-08-17 06:11:40 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-08-17 06:11:40 +0800 |
commit | 666f3cd66ce56013e5688d514e3c1fc3ec8a6ac4 (patch) | |
tree | ae8f2a3a805e0ac24ed3d1058138cf1b3c25b763 /app/scripts/lib/config-manager.js | |
parent | 121af0c4b9fd12e9960cbf5bbb3203819b854eb7 (diff) | |
download | tangerine-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.js | 6 |
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 () { |