From 0a8a25c818f4c3059998445730c632158deaaf43 Mon Sep 17 00:00:00 2001 From: Frankie Date: Sat, 1 Oct 2016 09:31:14 +0800 Subject: Fix issue #688 where fiat conversion does not persist when switching networks --- app/scripts/metamask-controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 2b10c8c35..fceac5263 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -22,7 +22,8 @@ module.exports = class MetamaskController { this.idStore.setStore(this.ethStore) this.messageManager = messageManager this.publicConfigStore = this.initPublicConfigStore() - this.configManager.setCurrentFiat('USD') + var currentFiat = this.configManager.getCurrentFiat() ? this.configManager.getCurrentFiat() : 'USD' + this.configManager.setCurrentFiat(currentFiat) this.configManager.updateConversionRate() this.scheduleConversionInterval() } -- cgit v1.2.3 From ebf864ae6e0efe7acbd83314c4343a73db38564d Mon Sep 17 00:00:00 2001 From: Frankie Date: Sun, 2 Oct 2016 04:53:43 +0800 Subject: Fix for readability --- app/scripts/metamask-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index fceac5263..9e1a885ae 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -22,7 +22,7 @@ module.exports = class MetamaskController { this.idStore.setStore(this.ethStore) this.messageManager = messageManager this.publicConfigStore = this.initPublicConfigStore() - var currentFiat = this.configManager.getCurrentFiat() ? this.configManager.getCurrentFiat() : 'USD' + var currentFiat = this.configManager.getCurrentFiat() || 'USD' this.configManager.setCurrentFiat(currentFiat) this.configManager.updateConversionRate() this.scheduleConversionInterval() -- cgit v1.2.3