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

Refactor: Decompose swap form #200

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Conversation

chapati23
Copy link
Contributor

Description

While trying to debug, I got very annoyed with the unwieldiness of the SwapForm with lots of components and hooks inlined in the same file.

This PR is about decomposing the SwapForm into smaller parts. It extracts components and hooks into individual files and aims at making the DX for this feature better.

Other changes

I also upgraded yarn from 3.3.1 to 4.6.0 while I was at it, hence the yarn.lock update, but no dependencies where actually changed or updated.

Tested

I checked that swaps still work in both directions and with or without approvals.

How to review

Everything should work exactly as it does on production right now, no functionality should have changed.

  • Check out the preview URL
  • Do a few swaps in different directions and with and without approval TXs
  • Review the code

Copy link

vercel bot commented Feb 28, 2025

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

Name Status Preview Comments Updated (UTC)
mento-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 28, 2025 2:46pm

@Andrew718PLTS
Copy link
Contributor

Andrew718PLTS commented Feb 28, 2025

@chapati23 The 'Continue' button is disabled upon entering the swap-in amount; I can't actually do a swap with that.
image

It looks like the bug that I fixed already. Have you updated the main branch before checkout? If not, try to do a rebase first.

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.

2 participants