[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:
Douglas Daniel
2026-03-23 11:35:07 -05:00
committed by GitHub
parent 089136ec9a
commit c990cffd8f
2 changed files with 9 additions and 7 deletions
@@ -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 (