From 93fe4e54c62091227d79cfe33d38a25927e1193e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Sun, 15 Jul 2018 20:12:36 +0200 Subject: [PATCH] Fix edgecase bug when switching fiat and not reseting the exchange bug was: select USD it should select BitMEX now select HKD it will select nothing in the list not 100% sure but i suspect that BITMEX used to exist on BTC-HKD but no longer, so it's an accepted choice by our api but it's not present in the list. the fix is to always reset the exchange to first one (which is the most volume one) when you switch countervalue --- src/actions/settings.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/actions/settings.js b/src/actions/settings.js index db6b9833..60251280 100644 --- a/src/actions/settings.js +++ b/src/actions/settings.js @@ -15,7 +15,11 @@ export const setDeveloperMode = (developerMode: boolean) => saveSettings({ devel export const setSentryLogs = (sentryLogs: boolean) => saveSettings({ sentryLogs }) export const setShareAnalytics = (shareAnalytics: boolean) => saveSettings({ shareAnalytics }) export const setMarketIndicator = (marketIndicator: *) => saveSettings({ marketIndicator }) -export const setCounterValue = (counterValue: string) => saveSettings({ counterValue }) +export const setCounterValue = (counterValue: string) => + saveSettings({ + counterValue, + counterValueExchange: null, + }) export const setLanguage = (language: ?string) => saveSettings({ language }) export const setRegion = (region: ?string) => saveSettings({ region }) export const setCounterValueExchange = (counterValueExchange: ?string) =>