From 0a8a25c818f4c3059998445730c632158deaaf43 Mon Sep 17 00:00:00 2001 From: Frankie Date: Sat, 1 Oct 2016 09:31:14 +0800 Subject: [PATCH 1/3] 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(-) 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() } From f28de37a8cbbc05978be3499bc8eb672108a8ed4 Mon Sep 17 00:00:00 2001 From: Frankie Date: Sat, 1 Oct 2016 09:38:53 +0800 Subject: [PATCH 2/3] Add to CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0ff662fe..84a074480 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Current Master +- Fix bug where chosen FIAT exchange rate does no persist when switching networks + ## 2.13.1 2016-09-23 - Fix a bug with estimating gas on Parity From ebf864ae6e0efe7acbd83314c4343a73db38564d Mon Sep 17 00:00:00 2001 From: Frankie Date: Sun, 2 Oct 2016 04:53:43 +0800 Subject: [PATCH 3/3] Fix for readability --- app/scripts/metamask-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()