Skip to content

Conversation

@0xjorgen
Copy link
Contributor

@0xjorgen 0xjorgen commented Dec 18, 2025

Integrates react-number-format to display user input with thousand separators (e.g., 1,234,567.89) in the bridge input fields.

Changes

  • New AmountInput component: Shared component that encapsulates NumericFormat with focus state management, preventing value conflicts between user typing and quote updates
  • Simplified OriginTokenInput and DestinationTokenDisplay: Removed duplicated formatting logic, now delegate to AmountInput
  • Enhanced ToggleUnitButton: Moved converted amount calculation into the component for better encapsulation
  • Removed useTokenInput hook: Logic moved directly into AmountInput component
  • Added Storybook: InputForm.stories.tsx with interaction test for thousand separator formatting

Technical Details

  • Uses onValueChange with sourceInfo.source === "event" to only handle user interactions
  • Focus state (isFocused) prevents quote updates from overwriting user input while typing
  • shouldUpdate flag determines whether to show calculated quote results or user input
Screenshot 2025-12-18 at 12 59 35 UTC@2x

@vercel
Copy link

vercel bot commented Dec 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
app-frontend-v3 Ready Ready Preview, Comment Dec 18, 2025 1:19pm
sepolia-frontend-v3 Ready Ready Preview, Comment Dec 18, 2025 1:19pm

@linear
Copy link

linear bot commented Dec 18, 2025

@vercel
Copy link

vercel bot commented Dec 18, 2025

Deployment failed with the following error:

Hobby accounts are limited to daily cron jobs. This cron expression (* * * * *) would run more than once per day. Upgrade to the Pro plan to unlock all Cron Jobs features on Vercel.

Learn More: https://vercel.link/3Fpeeb1

@0xjorgen 0xjorgen changed the title jorgen/fe 211 format input field to match output field format 2 feat: support thousand separator in user input Dec 18, 2025
…output-field-format-2

# Conflicts:
#	src/hooks/useTokenInput.ts
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