Skip to content

Conversation

@0xjorgen
Copy link
Contributor

@0xjorgen 0xjorgen commented Dec 15, 2025

Refactors the quote request state to use explicit user input tracking instead of trade type inference.

Changes

State Model

  • Replace tradeType ("exactInput" | "minOutput") + amount with explicit userInputField ("origin" | "destination") + userInputAmount + quoteOutputAmount
  • Separate user input from quote output for clearer data flow
  • Reset amounts when tokens change

Hooks

  • Add useTokenAmountInput hook to handle input state for both origin/destination fields
  • Remove old useTokenInput hook
  • Replace setOriginAmount/setDestinationAmount with unified setUserInput(field, amount) + setQuoteOutput(amount)

Components

  • Rename DestinationTokenDisplay → DestinationTokenInput for consistency
  • Inline ToggleUnitButton styles into shared styles file
  • Remove unused tracking hooks (useTrackToggleUnit, useTrackChainSelected, useTrackTokenSelected, useTrackBalanceSelectorClick)

API Cleanup

  • Remove sponsored bridge strategies (CCTP-sponsored, OFT-sponsored)
  • Remove sponsorship eligibility and routing logic
  • Consolidate sponsorship signing utilities

@vercel
Copy link

vercel bot commented Dec 15, 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 16, 2025 1:14pm
sepolia-frontend-v3 Ready Ready Preview, Comment Dec 16, 2025 1:14pm

@linear
Copy link

linear bot commented Dec 15, 2025

@vercel
Copy link

vercel bot commented Dec 15, 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 marked this pull request as draft December 15, 2025 20:50
@0xjorgen 0xjorgen changed the title jorgen/fe 211 format input field to match output field format refactor: input state Dec 15, 2025
@0xjorgen 0xjorgen changed the title refactor: input state refactor: quote request input state management Dec 16, 2025
@0xjorgen 0xjorgen force-pushed the jorgen/fe-211-format-input-field-to-match-output-field-format branch from d61bd81 to 1a82bce Compare December 16, 2025 12:55
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