Skip to content

fix: utxo estimate fees#11319

Merged
gomesalexandre merged 3 commits intodevelopfrom
fix-estimate-fees
Dec 8, 2025
Merged

fix: utxo estimate fees#11319
gomesalexandre merged 3 commits intodevelopfrom
fix-estimate-fees

Conversation

@kaladinlight
Copy link
Contributor

@kaladinlight kaladinlight commented Dec 8, 2025

Description

Fix regression that breaks utxo fees and improve naming to prevent future regressions.

Issue (if applicable)

N/A

Risk

High Risk PRs Require 2 approvals

Low

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

Testing

  • Ensure estimated fees are displayed for utxos (send modal)

Engineering

☝️

Operations

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

☝️

Screenshots (if applicable)

Current:
image

Fix:
image

Summary by CodeRabbit

  • Refactor
    • Improved internal fee estimation logic by refactoring how sender addresses are handled across different blockchain networks, enhancing code organization and type safety for fee calculations.

✏️ Tip: You can customize this high-level summary in your review settings.

@kaladinlight kaladinlight requested a review from a team as a code owner December 8, 2025 18:25
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

📝 Walkthrough

Walkthrough

This PR refactors how sender addresses are passed through fee estimation functions. The changes rename the generic from parameter to utxoFrom in EstimateFeesInput, remove sender address extraction from one hook, and update field names across related hooks to align with the new naming convention.

Changes

Cohort / File(s) Summary
Hook parameter and type alignment
src/components/Modals/Send/hooks/useSendDetails/useSendDetails.tsx, src/react-queries/hooks/useQuoteEstimatedFeesQuery.ts
Removed fromAccountId import and its extraction from useSendDetails; removed from parameter from estimateFees call. Added explicit return type annotation to estimateFeesArgs.
Fee estimation input refactoring
src/components/Modals/Send/utils.ts
Renamed EstimateFeesInput field from from?: string to utxoFrom?: string; updated internal usage to pass utxoFrom to UTXO chain fee data and account to Tron chain-specific fee data.
Thor transaction hook updates
src/lib/utils/thorchain/hooks/useSendThorTx.tsx
Added type import for EstimateFeesInput with explicit return type; renamed from: account to utxoFrom: fromAddress in Send transaction branch.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify utxoFrom field is correctly propagated across all fee estimation callsites and that removal of from parameter doesn't break UTXO or Tron fee calculations
  • Confirm type alignment between EstimateFeesInput and all hook usages after renaming

Possibly related PRs

  • #11212: Modifies the same useSendThorTx.tsx file for transaction-building input construction with potential field overlap
  • #11288: Adjusts sender address handling in fee estimation through chainSpecific parameters
  • #11274: Modifies Tron fee estimation sender address propagation with related field changes

Suggested reviewers

  • NeOMakinG
  • gomesalexandre

Poem

🐰 A sender field once fuzzy and unclear,
Is renamed sharp—now utxoFrom shines here!
From hooks to utils, the refactor flows free,
Type-safe and tidy, as fees ought to be! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: utxo estimate fees' directly and specifically describes the main change: fixing UTXO fee estimation functionality, which aligns with the PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-estimate-fees

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kaladinlight kaladinlight changed the title Fix estimate fees fix: estimate fees Dec 8, 2025
@kaladinlight kaladinlight changed the title fix: estimate fees fix: utxo estimate fees Dec 8, 2025
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

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

Tested locally, confirmed UTXO estimation is sane again.

Unable to double-check TRON sends as derivation seems to be currently borked with this error

Image

https://jam.dev/c/48a9cd30-0a99-4322-acca-36e5fbf60a1f

@gomesalexandre gomesalexandre merged commit bb85fd1 into develop Dec 8, 2025
4 checks passed
@gomesalexandre gomesalexandre deleted the fix-estimate-fees branch December 8, 2025 19:10
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