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

Fix: ensure slippage correct, fix another double spend issue for erc20 swaps, ... #74

Merged
merged 18 commits into from
Feb 20, 2025

Conversation

steezeburger
Copy link
Member

@steezeburger steezeburger commented Feb 14, 2025

  • fix slippage calculations for display
  • use same logic for minimum out calculations
  • cleanup some types, TokenAmount, TRADE_TYPE
  • add SwapOptions.isNativeIn and isNativeOut
  • use viem's formatUnits and delete own formatBalance
  • don't send and TIA when we're doing a simple erc20 swap. only need to send TIA when native in

…eanup slippage calculation. dont send value when erc20 swap.
Copy link

vercel bot commented Feb 14, 2025

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

Name Status Preview Comments Updated (UTC)
flame-defi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 20, 2025 10:19pm

@steezeburger steezeburger changed the title Fix: ensure slippage correct, fix another double spend issue for erc20 swaps, limit slippage input to 4 numbers and 2 decimal places Fix: ensure slippage correct, fix another double spend issue for erc20 swaps, ... Feb 20, 2025
* develop:
  feat: Add color primitives and tokens (#78)
Copy link
Contributor

@essj essj left a comment

Choose a reason for hiding this comment

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

🚀 LGTM!

I do see JSBI used a lot--maybe we can consider using native JavaScript BigInt instead, unless JSBI is needed for formatting.

* develop:
  Feature/token balances update (#80)
* develop:
  feat(earn): Add vault details page summary and APY chart (#79)
@steezeburger steezeburger merged commit a11b47f into develop Feb 20, 2025
3 checks passed
@steezeburger steezeburger deleted the fix/63-slippage branch February 20, 2025 22:19
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.

3 participants