Skip to content

Commit 1de4b18

Browse files
fix: apply tokenBalanceTextProps only to TokenBalanceView, not FiatBalanceView
When inlining the balance text style logic, tokenBalanceTextProps overrides were incorrectly applied to FiatBalanceView instances too. Only TokenBalanceView should receive the caller-supplied text overrides (variant/color/style); fiat balance views must always use the plain base constants. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 61ddee3 commit 1de4b18

1 file changed

Lines changed: 6 additions & 24 deletions

File tree

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

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -474,18 +474,9 @@ const TokenSelectorItemInner: React.FC<TokenSelectorItemProps> = ({
474474
<FiatBalanceView
475475
balance={fiatBalance}
476476
isSelected={shouldShowSelectedStyle}
477-
textStyle={[
478-
styles.rightValue,
479-
tokenBalanceTextProps?.textStyle,
480-
]}
481-
textVariant={
482-
tokenBalanceTextProps?.textVariant ??
483-
TOP_ROW_BALANCE_TEXT_STYLE.textVariant
484-
}
485-
textColor={
486-
tokenBalanceTextProps?.textColor ??
487-
TOP_ROW_BALANCE_TEXT_STYLE.textColor
488-
}
477+
textStyle={styles.rightValue}
478+
textVariant={TOP_ROW_BALANCE_TEXT_STYLE.textVariant}
479+
textColor={TOP_ROW_BALANCE_TEXT_STYLE.textColor}
489480
/>
490481
)}
491482
</Box>
@@ -519,18 +510,9 @@ const TokenSelectorItemInner: React.FC<TokenSelectorItemProps> = ({
519510
<FiatBalanceView
520511
balance={fiatBalance}
521512
isSelected={shouldShowSelectedStyle}
522-
textStyle={[
523-
styles.rightValue,
524-
tokenBalanceTextProps?.textStyle,
525-
]}
526-
textVariant={
527-
tokenBalanceTextProps?.textVariant ??
528-
BOTTOM_ROW_BALANCE_TEXT_STYLE.textVariant
529-
}
530-
textColor={
531-
tokenBalanceTextProps?.textColor ??
532-
BOTTOM_ROW_BALANCE_TEXT_STYLE.textColor
533-
}
513+
textStyle={styles.rightValue}
514+
textVariant={BOTTOM_ROW_BALANCE_TEXT_STYLE.textVariant}
515+
textColor={BOTTOM_ROW_BALANCE_TEXT_STYLE.textColor}
534516
/>
535517
) : (
536518
<TokenBalanceView

0 commit comments

Comments
 (0)