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

feat: Add SwapLite util functions #1648

Merged
merged 16 commits into from
Dec 16, 2024
Merged

Conversation

abcrane123
Copy link
Contributor

@abcrane123 abcrane123 commented Nov 20, 2024

What changed? Why?

  • useResetSwapLiteInputs : resets to token, from token, USDC, and ETH balances
  • getSwapLiteQuote: formats swap quote values
  • useSwapLiteTokens: returns token information (balance, etc) - for context, USDC and ETH will always be provided as swap options. users then have the ability to provide one more from token to the component

Notes to reviewers

How has it been tested?

Copy link

vercel bot commented Nov 20, 2024

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

Name Status Preview Comments Updated (UTC)
onchainkit-coverage ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 11:29pm
onchainkit-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 11:29pm
onchainkit-routes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 11:29pm

to.setAmountUSD(''),
]);
}, [from, fromETH, fromUSDC, to]);
};
Copy link
Contributor

@alessey alessey Dec 16, 2024

Choose a reason for hiding this comment

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

nit: this may be more flexible accepting an array of SwapUnits, it seems like some of this logic could be shared between swap and lite

Copy link
Contributor Author

Choose a reason for hiding this comment

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

created a ticket to refactor later

@abcrane123 abcrane123 merged commit 2a490b3 into main Dec 16, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants