Skip to content

Commit 7e4f08f

Browse files
fix: remove incomplete React.memo comparator from TokenSelectorItem
The custom comparator omitted children, networkImageSource, and several token sub-properties. When children (e.g. the info ButtonIcon) gets a new reference due to a parent re-render, the memo would block the re-render leaving a stale closure. Use default shallow comparison instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ad5bb67 commit 7e4f08f

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

app/components/UI/Bridge/components/TokenSelectorItem.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -490,16 +490,4 @@ const TokenSelectorItemInner: React.FC<TokenSelectorItemProps> = ({
490490
);
491491
};
492492

493-
export const TokenSelectorItem = React.memo(
494-
TokenSelectorItemInner,
495-
(prev, next) =>
496-
prev.onPress === next.onPress &&
497-
prev.token.address === next.token.address &&
498-
prev.token.chainId === next.token.chainId &&
499-
prev.token.balance === next.token.balance &&
500-
prev.token.balanceFiat === next.token.balanceFiat &&
501-
prev.isSelected === next.isSelected &&
502-
prev.isNoFeeAsset === next.isNoFeeAsset &&
503-
prev.shouldShowBalance === next.shouldShowBalance &&
504-
prev.networkName === next.networkName,
505-
);
493+
export const TokenSelectorItem = React.memo(TokenSelectorItemInner);

0 commit comments

Comments
 (0)