-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(apps/swap): use fiat value from tines in CurrencyInput #948
Conversation
EGN-394 Fiat price impact is often wrong because it's using stale fiat prices
It should use current fiat prices based on the AMM instead of the price API which can be stale up to 30m. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
0a956b1
to
a027576
Compare
a027576
to
bf67099
Compare
bb849e4
to
6f78190
Compare
6f78190
to
add5831
Compare
PR-Codex overview
This PR adds a new hook
useUSDCPrice
and updates some existing hooks and components to use it. It calculates the price of a given token in USDC based on the available liquidity pools.Detailed summary
useUSDCPrice
to calculate the price of a given token in USDC based on available liquidity poolsusePctChange
andPricePanel
to useuseUSDCPrice
CurrencyInput
to importuseUSDCPrice
instead ofusePrice
Trade
andSwapCurrencyOutput
to useusdPctChange
fromPricePanel
usePoolsCodeMap
to fetch the available liquidity pools for a given token pair