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.
feature/default_network_editable
Mark Stacey 5 years ago committed by GitHub
parent de02eeefbe
commit f9eb1440e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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) {

Loading…
Cancel
Save