Skip to content

Commit 9ca4da0

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 778d3b1 commit 9ca4da0

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
@@ -501,16 +501,4 @@ const TokenSelectorItemInner: React.FC<TokenSelectorItemProps> = ({
501501
);
502502
};
503503

504-
export const TokenSelectorItem = React.memo(
505-
TokenSelectorItemInner,
506-
(prev, next) =>
507-
prev.onPress === next.onPress &&
508-
prev.token.address === next.token.address &&
509-
prev.token.chainId === next.token.chainId &&
510-
prev.token.balance === next.token.balance &&
511-
prev.token.balanceFiat === next.token.balanceFiat &&
512-
prev.isSelected === next.isSelected &&
513-
prev.isNoFeeAsset === next.isNoFeeAsset &&
514-
prev.shouldShowBalance === next.shouldShowBalance &&
515-
prev.networkName === next.networkName,
516-
);
504+
export const TokenSelectorItem = React.memo(TokenSelectorItemInner);

0 commit comments

Comments
 (0)