Conversation
dan437
marked this pull request as ready for review
September 15, 2026 09:29
|
Current version of PR was reviewed by /review-bugbot on Sep 15, 11:27 GMT+2. It flagged 0 findings. Bugbot on commit |
This comment was marked as spam.
This comment was marked as spam.
dan437
marked this pull request as draft
September 15, 2026 09:43
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c40a55d. Configure here.
dan437
marked this pull request as ready for review
September 15, 2026 11:41
dan437
marked this pull request as draft
September 15, 2026 12:00
jpuri
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Explanation
Relay Max quotes could commit the full native-token balance when the paying account did not support EIP-7702, leaving no funds for source-network fees.
This change re-quotes with the phase-one maximum network fee reserved. ERC-20 payments keep the existing insufficient-native-balance behavior.
References
Checklist
Note
Medium Risk
Changes max-amount Relay quote math for native-token payments on non-EIP-7702 accounts, which affects how much users can send but improves transaction success.
Overview
Fixes Relay Max quotes that paid with native source tokens on accounts without EIP-7702, where the first quote could spend the entire balance and leave nothing for source-chain gas.
After the initial max quote, the flow now detects native source tokens (chain native address or Relay
NATIVE_TOKEN_ADDRESS, e.g. Polygon) and re-quotes withsourceTokenAmountreduced by the phase-one max source-network fee. If reservation is impossible, the adjusted quote fails, or fees eat the whole max, it falls back to the phase-one quote unchanged.ERC-20 max flows and accounts that support EIP-7702 still use the existing gas-station / native-balance logic; only this native-max + non-7702 branch is new. Tests and the package changelog document the behavior.
Reviewed by Cursor Bugbot for commit 63397aa. Bugbot is set up for automated code reviews on this repo. Configure here.