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(swap): enhance swap execution handling and UI responsiveness #992

Merged
merged 2 commits into from
Jan 20, 2025

Conversation

ArturHoncharuk
Copy link
Collaborator

  • Introduced isExecutingPrice state to manage the execution status of price calculations during swaps.
  • Updated ReviewSwapButton to disable the button when a price execution is in progress.
  • Modified useSwapFieldsHandler to set isExecutingPrice during token amount calculations, ensuring UI reflects loading states accurately.
  • Refactored swap function calls to wrap native addresses for improved compatibility.
  • Changed mock address in BarcodeScanner for better alignment with wallet connect standards.

- Introduced `isExecutingPrice` state to manage the execution status of price calculations during swaps.
- Updated `ReviewSwapButton` to disable the button when a price execution is in progress.
- Modified `useSwapFieldsHandler` to set `isExecutingPrice` during token amount calculations, ensuring UI reflects loading states accurately.
- Refactored swap function calls to wrap native addresses for improved compatibility.
- Changed mock address in `BarcodeScanner` for better alignment with wallet connect standards.
…handling

- Added `isExecutingPrice` to the swap context to manage the execution status during price calculations.
- Updated the `Balance` component to disable the "Select Max" button when a price execution is in progress, enhancing user experience and preventing unintended actions during loading states.
@ArturHoncharuk ArturHoncharuk merged commit 4409f88 into dev Jan 20, 2025
2 checks passed
@ArturHoncharuk ArturHoncharuk deleted the AMB-5215 branch January 20, 2025 15:56
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