From f9eb1440e463bdb4735420122843f63b4f40e437 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Wed, 13 May 2020 11:53:27 -0300 Subject: [PATCH] Always return a Boolean from `getShowFiatSelector` (#8585) `getShowFiatSelector` would return the `showFiatInTestnets` value directly when on mainnet, which could be `undefined`. Now it is cast to a Boolean instead. This was done to fix a PropType warning in a component that will be included in a future PR, where this selector was used for a required prop. --- ui/app/selectors/selectors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app/selectors/selectors.js b/ui/app/selectors/selectors.js index 891414e46..92b316a2c 100644 --- a/ui/app/selectors/selectors.js +++ b/ui/app/selectors/selectors.js @@ -288,7 +288,7 @@ export function preferencesSelector ({ metamask }) { export function getShouldShowFiat (state) { const isMainNet = getIsMainnet(state) const { showFiatInTestnets } = preferencesSelector(state) - return isMainNet || showFiatInTestnets + return Boolean(isMainNet || showFiatInTestnets) } export function getAdvancedInlineGasShown (state) {