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: generalise useRoute hook #2491

Merged
merged 11 commits into from
Jan 10, 2025
Merged

refactor: generalise useRoute hook #2491

merged 11 commits into from
Jan 10, 2025

Conversation

mimi-imtbl
Copy link
Contributor

@mimi-imtbl mimi-imtbl commented Jan 8, 2025

Hi👋, please prefix this PR's title with:

  • breaking-change: if you have introduced modification that necessitates immediate adjustments by this SDK's users to their applications, clients, or integrations to avert disruptions to existing features or functionalities.
  • feat:, fix:, refactor:, docs:, or chore:.

Summary

Generalise useRoutes hook to be used in different widgets by:

  • Extract some logic into useSlippage and useRouteCalculatgion hooks from useRoutes to improve maintainability
  • Extract some functions from useRoutes into external functions
  • Refactor out the logic to set Add Tokens routes from useRoutes
  • Refactor out the logic to track Add Tokens events from useRoutes
  • Rename types and functions to improve comprehension

Copy link

nx-cloud bot commented Jan 8, 2025

View your CI Pipeline Execution ↗ for commit 5573e1c.

Command Status Duration Result
nx affected -t build,lint,test,typecheck ✅ Succeeded 5m 28s View ↗
nx run-many --target=build --projects=@imtbl/sdk ✅ Succeeded 3m 29s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-08 23:52:27 UTC

@mimi-imtbl mimi-imtbl changed the title Refactor/squid hooks refactor: generalise useRoute hook Jan 9, 2025
@mimi-imtbl mimi-imtbl marked this pull request as ready for review January 9, 2025 02:39
@mimi-imtbl mimi-imtbl requested a review from a team as a code owner January 9, 2025 02:39
Copy link
Contributor

@luads luads left a comment

Choose a reason for hiding this comment

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

Great job on useRoutes 🙏

@mimi-imtbl mimi-imtbl added this pull request to the merge queue Jan 10, 2025
Merged via the queue into main with commit 281e100 Jan 10, 2025
7 checks passed
@mimi-imtbl mimi-imtbl deleted the refactor/squid-hooks branch January 10, 2025 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants