Skip to content
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

revert: "fix: remove USD value impact" #525

Merged

Conversation

just-toby
Copy link
Collaborator

@just-toby just-toby commented Mar 2, 2023

Reverts #457 and updates it - see comments for details.

the main goal here is to show the correct % value based on the context it's in - fiat value impact next to the $ amount, slippage next to the word "slippage", etc

@vercel
Copy link

vercel bot commented Mar 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
widgets ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 7, 2023 at 10:23PM (UTC)

@vercel vercel bot temporarily deployed to Preview March 2, 2023 17:42 Inactive
@just-toby just-toby changed the title revert "fix: remove USD value impact" revert: "fix: remove USD value impact" Mar 2, 2023
@vercel vercel bot temporarily deployed to Preview March 2, 2023 19:22 Inactive
@just-toby just-toby force-pushed the revert-457-WEB-2867-Widget-fix-price-slippage-in-widget branch from dfc9d19 to c6a4075 Compare March 2, 2023 19:24
@vercel vercel bot temporarily deployed to Preview March 2, 2023 19:29 Inactive
src/components/Swap/Output.tsx Outdated Show resolved Hide resolved
src/components/Swap/Summary/Estimate.tsx Outdated Show resolved Hide resolved
src/components/Swap/Toolbar/index.tsx Show resolved Hide resolved
src/components/Swap/index.tsx Show resolved Hide resolved
src/hooks/swap/useSwapInfo.tsx Outdated Show resolved Hide resolved
src/hooks/useAllCurrencyCombinations.ts Show resolved Hide resolved
src/utils/computeFiatValuePriceImpact.tsx Show resolved Hide resolved
src/hooks/useSlippage.ts Outdated Show resolved Hide resolved
@@ -22,6 +25,21 @@ export function usePriceImpact(trade?: InterfaceTrade): PriceImpact | undefined
}, [trade])
}

export function useFiatPriceImpact(trade?: InterfaceTrade) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this logic was removed in the previous PR, i'm adding it back here

@just-toby just-toby marked this pull request as ready for review March 2, 2023 19:35
@vercel vercel bot temporarily deployed to Preview March 2, 2023 19:44 Inactive
src/components/Swap/Output.tsx Outdated Show resolved Hide resolved
src/hooks/swap/useSwapInfo.tsx Outdated Show resolved Hide resolved
src/hooks/useSlippage.ts Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview March 7, 2023 22:23 Inactive
@just-toby
Copy link
Collaborator Author

addressed comments

@just-toby just-toby merged commit b8998ef into main Mar 8, 2023
@just-toby just-toby deleted the revert-457-WEB-2867-Widget-fix-price-slippage-in-widget branch March 8, 2023 20:19
@github-actions
Copy link

github-actions bot commented Mar 8, 2023

🎉 This PR is included in version 2.47.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants