Skip to content

feat(expenses): reusable AssetSelector with live fiat preview - #418

Merged
K1NGD4VID merged 2 commits into
mergepay:mainfrom
codexhange:feat/asset-selector
Sep 2, 2026
Merged

feat(expenses): reusable AssetSelector with live fiat preview#418
K1NGD4VID merged 2 commits into
mergepay:mainfrom
codexhange:feat/asset-selector

Conversation

@codexhange

Copy link
Copy Markdown
Contributor

Implements #401 — a controlled, keyboard-accessible asset selector with real-time conversion.

What's included

  • src/components/expenses/AssetSelector.tsx — controlled component (value/agentonChange) supporting XLM (native), the stable asset, and custom trustline tokens, in the neobrutalist style.
  • Live fiat preview — as the crypto amount is typed, the selected asset's fiat equivalent updates in real time via the existing CoinGecko-backed useCurrencyRates hook and convertToFiat helper (with precision handling on the Stellar grid).
  • Accessibility — proper <label>, aria- props, and aria-live for the conversion preview.
  • Wired in — replaces the raw asset <select> in the add-expense dialog.
  • Unit tests for the conversion helper (rounding, unknown/custom assets, invalid & negative amounts).

Closes #401

Introduces a reusable neo-brutalist AssetSelector (issue mergepay#401): asset
selection for XLM / stable / custom trustline tokens with a live fiat
equivalent that updates as the crypto amount is typed, using the existing
CoinGecko-backed useCurrencyRates hook and convertToFiat helper. Wires it
into the add-expense dialog in place of the raw asset select.

Closes mergepay#401
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@codexhange Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@mergekeeper

mergekeeper Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

MergeKeeper review unavailable

AI provider review response did not contain valid JSON

No approval or merge action was taken.

@K1NGD4VID
K1NGD4VID merged commit 3449b68 into mergepay:main Sep 2, 2026
1 check failed
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.

Implement Real-time Currency Converter and Asset Selector Component

2 participants