[Wallet]: Disable Dominant Color Background for iOS WebUI (#34847)
Fixes a crash that was occurring on iOS WebUI when selecting a token on the Send/Swap/Bridge screens
This commit is contained in:
@@ -159,6 +159,7 @@ export const SendScreen = React.memo(() => {
|
||||
const isPanel = useSafeUISelector(UISelectors.isPanel)
|
||||
const isMobile = useSafeUISelector(UISelectors.isMobile)
|
||||
const isMobileOrPanel = isMobile || isPanel
|
||||
const isIOS = useSafeUISelector(UISelectors.isIOS)
|
||||
const isKeyboardVisible = useIsKeyboardVisible()
|
||||
const isZCashShieldedTransactionsEnabled = useSafeWalletSelector(
|
||||
WalletSelectors.isZCashShieldedTransactionsEnabled,
|
||||
@@ -304,9 +305,9 @@ export const SendScreen = React.memo(() => {
|
||||
return amountWei.gt(sendAssetBalance)
|
||||
}, [sendAssetBalance, sendAmount, tokenFromParams])
|
||||
|
||||
const tokenColor = React.useMemo(() => {
|
||||
return getDominantColorFromImageURL(tokenFromParams?.logo ?? '')
|
||||
}, [tokenFromParams?.logo])
|
||||
const tokenColor = isIOS
|
||||
? undefined
|
||||
: getDominantColorFromImageURL(tokenFromParams?.logo ?? '')
|
||||
|
||||
const needsAccountSelected =
|
||||
accountIdFromParams === undefined
|
||||
|
||||
@@ -110,6 +110,7 @@ export const Swap = () => {
|
||||
const isPanel = useSafeUISelector(UISelectors.isPanel)
|
||||
const isMobile = useSafeUISelector(UISelectors.isMobile)
|
||||
const isMobileOrPanel = isMobile || isPanel
|
||||
const isIOS = useSafeUISelector(UISelectors.isIOS)
|
||||
const isKeyboardVisible = useIsKeyboardVisible()
|
||||
|
||||
// Refs
|
||||
@@ -137,10 +138,10 @@ export const Swap = () => {
|
||||
showPrivacyModal,
|
||||
)
|
||||
|
||||
// Memos
|
||||
const tokenColor = React.useMemo(() => {
|
||||
return getDominantColorFromImageURL(toToken?.logo ?? '')
|
||||
}, [toToken?.logo])
|
||||
// Computed
|
||||
const tokenColor = isIOS
|
||||
? undefined
|
||||
: getDominantColorFromImageURL(toToken?.logo ?? '')
|
||||
|
||||
// render
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user