aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/scripts/lib/config-manager.js6
-rw-r--r--app/scripts/lib/idStore.js3
-rw-r--r--app/scripts/metamask-controller.js1
-rw-r--r--ui/app/actions.js1
-rw-r--r--ui/app/reducers/metamask.js1
5 files changed, 8 insertions, 4 deletions
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js
index cd0d37e98..03f8c054d 100644
--- a/app/scripts/lib/config-manager.js
+++ b/app/scripts/lib/config-manager.js
@@ -288,7 +288,7 @@ ConfigManager.prototype.setConversionRate = function () {
.then(function (response) {
const parsedResponse = JSON.parse(response)
data.conversionRate = Number(parsedResponse.ticker.price)
- data.conversionLastUpdated = new Date(parsedResponse.timestamp).toString()
+ data.conversionDate = new Date(parsedResponse.timestamp).toString()
this.setData(data)
}.bind(this)).catch(function (err) {
console.log('Error in conversion.', err)
@@ -300,7 +300,7 @@ ConfigManager.prototype.getConversionRate = function () {
return ('conversionRate' in data) && data.conversionRate
}
-ConfigManager.prototype.getConversionLastUpdated = function () {
+ConfigManager.prototype.getConversionDate = function () {
var data = this.getData()
- return ('conversionLastUpdated' in data) && data.conversionLastUpdated
+ return ('conversionDate' in data) && data.conversionDate
}
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js
index 94aaad1d1..b6c136b8f 100644
--- a/app/scripts/lib/idStore.js
+++ b/app/scripts/lib/idStore.js
@@ -100,7 +100,8 @@ IdentityStore.prototype.getState = function () {
messages: messageManager.getMsgList(),
selectedAddress: configManager.getSelectedAccount(),
currentFiat: configManager.getCurrentFiat(),
- currentConversion: configManager.getConversionRate(),
+ conversionRate: configManager.getConversionRate(),
+ conversionDate: configManager.getConversionDate(),
}))
}
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 7bf8fd5ea..99769fa3c 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -245,6 +245,7 @@ module.exports = class MetamaskController {
const data = {
conversionRate: this.configManager.getConversionRate,
currentFiat: this.configManager.getCurrentFiat,
+ conversionDate: this.configManager.getConversionDate,
}
cb(data)
} catch (e) {
diff --git a/ui/app/actions.js b/ui/app/actions.js
index c5fd2df08..50b711f3b 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -219,6 +219,7 @@ function setCurrentFiat (fiat) {
value: {
currentFiat: data.currentFiat,
conversionRate: data.conversionRate,
+ conversionDate: data.conversionDate,
}
})
})
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js
index d5d17135f..50b9e0819 100644
--- a/ui/app/reducers/metamask.js
+++ b/ui/app/reducers/metamask.js
@@ -113,6 +113,7 @@ function reduceMetamask (state, action) {
return extend(metaMaskState, {
currentFiat: action.value.currentFiat,
conversionRate: action.value.conversionRate,
+ conversionDate: action.value.conversionDate,
})
default: