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: stop refetching network fees after hop execution #8570

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

gomesalexandre
Copy link
Contributor

@gomesalexandre gomesalexandre commented Jan 14, 2025

Description

What the box say, this precisely does.

Issue (if applicable)

Risk

High Risk PRs Require 2 approvals

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Low to none

Testing

  • Ensure network fees still refetch at 15s interval (assuming your window/tab is active) while the Tx for the current hop hasn't been initiated
  • Ensure fees are not refetched anymore after signing and broadcasting the Tx for the current hop.

Engineering

  • ^

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)
  • ^

Screenshots (if applicable)

https://jam.dev/c/76327510-a741-4d27-b786-24ae66c882fb

@gomesalexandre gomesalexandre requested a review from a team as a code owner January 14, 2025 14:29
Copy link
Member

@0xApotheosis 0xApotheosis left a comment

Choose a reason for hiding this comment

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

Does indeed what it says on the box!

Suggestion: Architecturally I'd prefer to see this logic in components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx and passed down in the enabled prop of useTradeNetworkFeeCryptoBaseUnit so that the useTradeNetworkFeeCryptoBaseUnit hook doesn't concern itself with the current state.

@gomesalexandre gomesalexandre enabled auto-merge (squash) January 14, 2025 22:07
@gomesalexandre gomesalexandre merged commit e171e21 into develop Jan 14, 2025
3 checks passed
@gomesalexandre gomesalexandre deleted the feat_stop_refetching_hop_executed branch January 14, 2025 22:15
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.

Disable network fee estimation during transaction pending state on swapper
2 participants