fix: skip useInsufficientNativeReserveError if non evm cp-7.77.0#29992
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29992 +/- ##
==========================================
- Coverage 81.54% 81.54% -0.01%
==========================================
Files 5343 5345 +2
Lines 142128 142199 +71
Branches 32411 32437 +26
==========================================
+ Hits 115899 115956 +57
- Misses 18299 18304 +5
- Partials 7930 7939 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
maxime-oe
left a comment
There was a problem hiding this comment.
lgtm. Thank you for this fix.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag selection rationale:
Tags NOT selected:
Performance Test Selection: |
|



Description
Fixes an issue introduced by #29712, where the app would crash if a user tries to get a non-EVM swap quote. The fix was to skip
useInsufficientNativeReserveErrorif it is a non-EVM network.Changelog
CHANGELOG entry: Fixed app crashing when trying to get a Swaps quote for non-EVM networks
Related issues
Fixes: #29987
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2026-05-11.at.12.15.57.PM.mov
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Low risk guard change that prevents running EVM-only reserve logic on non-EVM chain IDs; main risk is accidentally suppressing the warning on chains that should still be checked.
Overview
Prevents crashes when requesting swap/bridge quotes on non-EVM networks by short-circuiting
useInsufficientNativeReserveErrorwhentoken.chainIdis non-EVM.Adds regression coverage ensuring the native-reserve warning is not shown for Solana swaps, and extends the hook tests to assert it returns
undefinedfor multiple non-EVM native tokens (Solana/Bitcoin/Tron). Also updates the hook test store setup to uselegacy_createStore.Reviewed by Cursor Bugbot for commit a00c033. Bugbot is set up for automated code reviews on this repo. Configure here.