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(swap): enhance swap functionality with new payable arguments #984

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

ArturHoncharuk
Copy link
Collaborator

  • Introduced swapPayableArgsCallback to streamline argument preparation for ETH swaps.
  • Updated swapExactETHForTokens, swapMultiHopExactTokensForTokens, and swapExactTokensForETH functions to utilize the new callback for cleaner code and improved readability.
  • Modified useSwapActions hook to pass the correct amount parameters for token swaps, ensuring accurate transaction execution.

- Introduced `swapPayableArgsCallback` to streamline argument preparation for ETH swaps.
- Updated `swapExactETHForTokens`, `swapMultiHopExactTokensForTokens`, and `swapExactTokensForETH` functions to utilize the new callback for cleaner code and improved readability.
- Modified `useSwapActions` hook to pass the correct amount parameters for token swaps, ensuring accurate transaction execution.
… functions

- Removed `swapArgsCallback` and `swapPayableArgsCallback` functions to streamline the codebase.
- Updated imports in `index.ts` to reflect the removal of the deprecated functions.
- This change enhances code readability and maintainability by consolidating argument preparation logic.
@ArturHoncharuk ArturHoncharuk merged commit d1bc2bf into dev Jan 17, 2025
2 checks passed
@ArturHoncharuk ArturHoncharuk deleted the fix/dex/methods branch January 17, 2025 12:14
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