mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
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.
This commit is contained in:
parent
de02eeefbe
commit
f9eb1440e4
@ -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…
Reference in New Issue
Block a user