Skip to content

fix: show networkFeeError at trade confirm#12197

Merged
kaladinlight merged 1 commit intodevelopfrom
estimate-gas-trade-error
Mar 19, 2026
Merged

fix: show networkFeeError at trade confirm#12197
kaladinlight merged 1 commit intodevelopfrom
estimate-gas-trade-error

Conversation

@kaladinlight
Copy link
Copy Markdown
Contributor

@kaladinlight kaladinlight commented Mar 19, 2026

This change got merged to release after the release already went out (UI wasn't fresh showing the release as open when I was looking). New PR to get fix into develop for next release.

#12192

Summary by CodeRabbit

  • Bug Fixes
    • Improved error handling for network fee estimation failures. Users now receive clear error alerts when network fees cannot be calculated, with the trade button disabled to prevent incomplete transactions.

@kaladinlight kaladinlight requested a review from a team as a code owner March 19, 2026 19:04
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 19b156ce-eb12-429c-ad90-9b9eb9ce6927

📥 Commits

Reviewing files that changed from the base of the PR and between 2a70c34 and 7cca061.

📒 Files selected for processing (2)
  • src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/TradeFooterButton.tsx

📝 Walkthrough

Walkthrough

The changes add error handling for network fee estimation failures in the trade confirmation flow. The network fee error is captured from a hook, propagated to the footer button component via props, and used to display error messages and disable the trade action when errors occur.

Changes

Cohort / File(s) Summary
Trade Confirmation Error Handling
src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx, src/components/MultiHopTrade/components/TradeConfirm/TradeFooterButton.tsx
Added network fee error capture and propagation. TradeConfirmFooter extracts networkFeeError from the fee hook and passes it to TradeFooterButton. TradeFooterButton displays an error alert when present, turns the button red, and disables it during network fee errors.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A hop, a skip, a gentle catch—
When fees fail, I sound the match!
With warnings red and buttons gray,
We safely guard the trading way. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: show networkFeeError at trade confirm' clearly and concisely describes the main change: displaying network fee errors on the trade confirmation screen.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch estimate-gas-trade-error
📝 Coding Plan
  • Generate coding plan for human review comments

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 merged commit d9f17f4 into develop Mar 19, 2026
4 checks passed
@kaladinlight kaladinlight deleted the estimate-gas-trade-error branch March 19, 2026 19:18
kaladinlight added a commit that referenced this pull request Apr 1, 2026
* feat: affiliate system alignment - public-api, widget, dashboard (#12150)

* feat: add RPC fallback resilience for unchained outages (#12017)

* chore: update near affiliate address (#12156)

* fix: codex config relative path to agents.md (#12152)

fix: codex config relative path to AGENTS.md

Codex resolves model_instructions_file relative to .codex/ dir,
so "AGENTS.md" was looking for .codex/AGENTS.md instead of repo root.

Co-authored-by: gomes-bot <contact@0xgom.es>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix: restore missing transaction history translation keys (#12168)

* fix: bump NativeQrScanner minimum version to 3.7.2 (#12173)

The native QR scanner handler ships in mobile app v3.7.2 (mobile-app
PR #156), but the version gate was set to 3.4.0. This caused mobile
apps v3.4.0–3.7.1 to incorrectly attempt native scanning, resulting
in a 60-second spinner timeout with no way to scan.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix: make WalletConnect network selection list scrollable (#12169)

* fix: batch yield balance queries to respect api limit (#12174)

* fix: graceful error message when yield tx fails due to insufficient gas (#12176)

* fix: sync rfox staking asset selection to context for modals (#12175)

* fix: release script squash-merge compat and backmerge automation (#12162)

* fix: prevent duplicate private sync pr in release script

merged_untagged case was creating a private sync PR without checking
if one already existed, unlike tagged_private_stale which had the guard.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: prevent duplicate private sync pr in release script

tagged_private_stale case was creating a private sync PR even when
private was already content-identical to main (SHA mismatch due to
propagation delay after a sync PR merges). Added a content diff check
to bail early in that case. Same guard applied to the hotfix path.

The merged_untagged case also gets the open-PR guard for belt-and-suspenders.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: idle prereleaseMerged content diff + tagged_private_stale backmerge auto-merge

- idle case: use git diff content check instead of SHA equality for
  prereleaseMerged - squash merges diverge SHAs even when content matches
- tagged_private_stale (regular + hotfix): set auto-merge with merge
  commit strategy on backmerge PR so it lands without manual intervention

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: coderabbitai review - prereleaseMerged ahead-check + no early break in tagged_private_stale

- idle: replace SHA/content-diff prereleaseMerged with commit-ahead check
  (origin/main..origin/release) - prevents false positive when release is
  *behind* main (e.g. post-hotfix), which would have routed into release PR
  path with 0 commits
- tagged_private_stale (regular + hotfix): remove early break when private
  is content-synced - script must still evaluate backmerge PR creation even
  when private sync is a no-op

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: prettier formatting in release script

* fix: enable auto-merge on existing backmerge PRs during reruns

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: lint

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: gomes-bot <contact@0xgom.es>

* docs: update qabot skill for agent-browser 0.20.x features (#12177)

* chore: update near affiliate address

* docs: update qabot skill for agent-browser 0.20.x features

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Apotheosis <0xapotheosis@gmail.com>
Co-authored-by: gomes-bot <contact@0xgom.es>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: route custom token metadata imports through proxy (#12040)

* fix: use content diff for private sync state detection in release script (#12181)

* fix: type error on mismatch viem version (#12193)

* fix: tron trc20 balances for non-activated accounts + send warning (#12191)

* feat: abstract chain + addchain scaffolder (#12186)

* fix: move workspace cetusprotocol dependecies into swapper package (#12195)

* fix: show networkFeeError at trade confirm (#12197)

* fix: chainflip swap explorer link and solana compute budget (#12178)

* fix(public-api): fix broken dev setup, replace smoke tests with vitest (#12198)

* chore: refactor to improve maintainability (#12199)

* fix: align public-api Docker image paths and simplify server config (#12204)

* feat: chainflip lending dashboard revamp (#12189)

* feat: add affiliate & auth routes to public-api, refactor affiliate-dashboard for prod (#12200)

* chore: update app translations (#12209)

* chore: update env vars (#12210)

* chore: railway deployment updates for swap widget and affiliate dashboard (#12227)

* fix: asset generation scripts (#12228)

* feat: regenerate asset data 03/31/2026 (#12229)

Co-authored-by: asset-generation-bot <action@github.com>

---------

Co-authored-by: NeOMakinG <14963751+NeOMakinG@users.noreply.github.com>
Co-authored-by: Apotheosis <0xapotheosis@gmail.com>
Co-authored-by: gomes <17035424+gomesalexandre@users.noreply.github.com>
Co-authored-by: gomes-bot <contact@0xgom.es>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Jibles <premiumjibles@gmail.com>
Co-authored-by: firebomb1 <88804546+firebomb1@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: asset-generation-bot <action@github.com>
kaladinlight added a commit that referenced this pull request Apr 2, 2026
chore: prerelease v1.1019.0 (#12230)

* feat: affiliate system alignment - public-api, widget, dashboard (#12150)

* feat: add RPC fallback resilience for unchained outages (#12017)

* chore: update near affiliate address (#12156)

* fix: codex config relative path to agents.md (#12152)

fix: codex config relative path to AGENTS.md

Codex resolves model_instructions_file relative to .codex/ dir,
so "AGENTS.md" was looking for .codex/AGENTS.md instead of repo root.




* fix: restore missing transaction history translation keys (#12168)

* fix: bump NativeQrScanner minimum version to 3.7.2 (#12173)

The native QR scanner handler ships in mobile app v3.7.2 (mobile-app
PR #156), but the version gate was set to 3.4.0. This caused mobile
apps v3.4.0–3.7.1 to incorrectly attempt native scanning, resulting
in a 60-second spinner timeout with no way to scan.



* fix: make WalletConnect network selection list scrollable (#12169)

* fix: batch yield balance queries to respect api limit (#12174)

* fix: graceful error message when yield tx fails due to insufficient gas (#12176)

* fix: sync rfox staking asset selection to context for modals (#12175)

* fix: release script squash-merge compat and backmerge automation (#12162)

* fix: prevent duplicate private sync pr in release script

merged_untagged case was creating a private sync PR without checking
if one already existed, unlike tagged_private_stale which had the guard.



* fix: prevent duplicate private sync pr in release script

tagged_private_stale case was creating a private sync PR even when
private was already content-identical to main (SHA mismatch due to
propagation delay after a sync PR merges). Added a content diff check
to bail early in that case. Same guard applied to the hotfix path.

The merged_untagged case also gets the open-PR guard for belt-and-suspenders.



* fix: idle prereleaseMerged content diff + tagged_private_stale backmerge auto-merge

- idle case: use git diff content check instead of SHA equality for
  prereleaseMerged - squash merges diverge SHAs even when content matches
- tagged_private_stale (regular + hotfix): set auto-merge with merge
  commit strategy on backmerge PR so it lands without manual intervention



* fix: coderabbitai review - prereleaseMerged ahead-check + no early break in tagged_private_stale

- idle: replace SHA/content-diff prereleaseMerged with commit-ahead check
  (origin/main..origin/release) - prevents false positive when release is
  *behind* main (e.g. post-hotfix), which would have routed into release PR
  path with 0 commits
- tagged_private_stale (regular + hotfix): remove early break when private
  is content-synced - script must still evaluate backmerge PR creation even
  when private sync is a no-op



* fix: prettier formatting in release script

* fix: enable auto-merge on existing backmerge PRs during reruns



* fix: lint

---------




* docs: update qabot skill for agent-browser 0.20.x features (#12177)

* chore: update near affiliate address

* docs: update qabot skill for agent-browser 0.20.x features



---------





* feat: route custom token metadata imports through proxy (#12040)

* fix: use content diff for private sync state detection in release script (#12181)

* fix: type error on mismatch viem version (#12193)

* fix: tron trc20 balances for non-activated accounts + send warning (#12191)

* feat: abstract chain + addchain scaffolder (#12186)

* fix: move workspace cetusprotocol dependecies into swapper package (#12195)

* fix: show networkFeeError at trade confirm (#12197)

* fix: chainflip swap explorer link and solana compute budget (#12178)

* fix(public-api): fix broken dev setup, replace smoke tests with vitest (#12198)

* chore: refactor to improve maintainability (#12199)

* fix: align public-api Docker image paths and simplify server config (#12204)

* feat: chainflip lending dashboard revamp (#12189)

* feat: add affiliate & auth routes to public-api, refactor affiliate-dashboard for prod (#12200)

* chore: update app translations (#12209)

* chore: update env vars (#12210)

* chore: railway deployment updates for swap widget and affiliate dashboard (#12227)

* fix: asset generation scripts (#12228)

* feat: regenerate asset data 03/31/2026 (#12229)



---------

Co-authored-by: NeOMakinG <14963751+NeOMakinG@users.noreply.github.com>
Co-authored-by: Apotheosis <0xapotheosis@gmail.com>
Co-authored-by: gomes <17035424+gomesalexandre@users.noreply.github.com>
Co-authored-by: gomes-bot <contact@0xgom.es>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Jibles <premiumjibles@gmail.com>
Co-authored-by: firebomb1 <88804546+firebomb1@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: asset-generation-bot <action@github.com>
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.

1 participant