Skip to content

Conversation

Jon-edge
Copy link
Collaborator

@Jon-edge Jon-edge commented Oct 17, 2025

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Note

Standardizes FiatText to render an EdgeText and refactors components to use useFiatText/useTokenDisplayData, simplifying props and fixing nested text issues across UI.

  • Text/Formatting:
    • FiatText now returns an EdgeText (adds optional style), instead of a raw string.
    • Introduces/prefer useFiatText + useTokenDisplayData to precompute fiat strings.
  • Common/Exchange:
    • ExchangeRate2: replace inline FiatText with precomputed fiatText string and updated hooks.
  • Modals:
    • FlipInputModal2: precompute balanceFiatText and feeFiatText via hooks; replace inline FiatText instances.
  • Rows/Tiles:
    • IconDataRow: props accept string | ReactNode and centralized render helper.
    • CryptoFiatAmountRow, CryptoFiatAmountTile, FiatAmountTile: typings to React.FC, conditional rendering to avoid double-wrapping, use precomputed fiat where applicable.
  • Scenes:
    • RequestScene: pass style directly to FiatText and remove extra EdgeText wrapper.
    • Loans/LoanCreateConfirmationScene: simplify by rendering FiatText directly.
  • Tests:
    • Snapshots updated to reflect Text wrapping around fiat values (e.g., €1.83, €0.000000).

Written by Cursor Bugbot for commit 2401f92. This will update automatically on new commits. Configure here.


cursor[bot]

This comment was marked as outdated.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 140 to 145
title: { title: lstrings.quote_fixed_quotes, rightTitle },
data: [...quotes.filter((quote: EdgeSwapQuote) => !quote.isEstimate)]
data: [
...quotes.filter((quote: EdgeSwapQuote) => !quote.isEstimate),
...quotes.filter((quote: EdgeSwapQuote) => !quote.isEstimate),
...quotes.filter((quote: EdgeSwapQuote) => !quote.isEstimate)
]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid triplicating fixed quotes in the provider list

The sectionList for the swap confirmation modal now spreads the array of non‑estimate quotes three times (...quotes.filter(...) repeated on lines 142‑144). This causes every fixed quote to appear three times in the "fixed quotes" section and inflates the data set, which will mislead users and can slow the list rendering. The previous implementation included the array only once; please revert to a single spread when building the section data.

Useful? React with 👍 / 👎.

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@swansontec swansontec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The AI seems to think there is a problem, but I don't see it. If you can just double-check that, I certainly have no objection.

pluginId: wallet.currencyConfig.currencyInfo.pluginId,
maxPrecision: 2,
subCentTruncation: true
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this AI comment correct?

@Jon-edge Jon-edge force-pushed the jon/fix/fiat-text branch 3 times, most recently from 828c26a to afa7272 Compare October 21, 2025 23:22
@Jon-edge Jon-edge enabled auto-merge October 21, 2025 23:23
@Jon-edge Jon-edge disabled auto-merge October 21, 2025 23:23
cursor[bot]

This comment was marked as outdated.

A component that returns a node containing plain text is misleading.
- Callers may try to differentiate between strings and `ReactNodes` and `FiatText's` return value can cause runtime errors about strings not in `<Text>` components.
- Update so the `useFiatText` hook is used for getting the raw text value, while the `FiatText` is a convenience component that returns an `EdgeText` wrapped component
@Jon-edge Jon-edge disabled auto-merge October 22, 2025 17:15
@Jon-edge Jon-edge merged commit 67ce339 into develop Oct 22, 2025
2 checks passed
@Jon-edge Jon-edge deleted the jon/fix/fiat-text branch October 22, 2025 17:15
pluginId: wallet.currencyConfig.currencyInfo.pluginId,
cryptoExchangeMultiplier: denomination.multiplier,
isoFiatCurrencyCode
})
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Inconsistent Denomination Handling in useFiatText

The useFiatText hook's cryptoExchangeMultiplier parameter is sourced inconsistently. It's sometimes taken from component props (CryptoFiatAmountTile) or mismatched with the nativeCryptoAmount source (ExchangeRate2). This deviates from the original FiatText component's consistent denomination handling, potentially causing incorrect fiat conversions when display and exchange denominations differ.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants