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: Swap success state - refetch balances and clear inputs #1089

Merged
merged 17 commits into from
Aug 29, 2024

Conversation

0xAlec
Copy link
Contributor

@0xAlec 0xAlec commented Aug 16, 2024

What changed? Why?

  • add FromTo type
  • add balanceResponse in SwapUnit type
  • return balanceResponse from Wagmi balance queries in useFromTo and useSwapBalances
  • add useResetInputs hook

clears the inputs and refetches balances on a successful swap

Notes to reviewers

  • no success SwapMessage rendered yet
  • this does not count for transaction reverts, we will need to add this handling separately

How has it been tested?
playground - try making a swap

Copy link

vercel bot commented Aug 16, 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 Aug 29, 2024 3:39pm
onchainkit-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2024 3:39pm
onchainkit-routes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2024 3:39pm

abcrane123
abcrane123 previously approved these changes Aug 20, 2024
Copy link
Contributor

@abcrane123 abcrane123 left a comment

Choose a reason for hiding this comment

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

this looks good to me ! but make sure to add back disabled flag.

@abcrane123 abcrane123 self-requested a review August 20, 2024 20:44
abcrane123

This comment was marked as duplicate.

Copy link
Contributor

@abcrane123 abcrane123 left a comment

Choose a reason for hiding this comment

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

nice this lgtm!

@0xAlec 0xAlec merged commit ef6e936 into main Aug 29, 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.

4 participants