Skip to content

fix(CHAIN-4779): force sponsored gas mode for session-key sends - #24

Merged
montycheese merged 1 commit into
mainfrom
fix/chain-4779-session-key-gas-mode
Jul 24, 2026
Merged

fix(CHAIN-4779): force sponsored gas mode for session-key sends#24
montycheese merged 1 commit into
mainfrom
fix/chain-4779-session-key-gas-mode

Conversation

@montycheese

Copy link
Copy Markdown
Contributor

Summary

  • When a session-key signer is selected, force gas mode to sponsored (free) and hide unsupported Pay in ETH / Pay in USDV options.
  • Add a pre-send guard so session-key + non-sponsored gas cannot reach estimation/submission; owner-key flows keep all three gas modes.

Fixes CHAIN-4779

Test plan

  • Select an owner signer → ETH / Sponsored / USDV gas options remain available
  • Select a session-key signer → gas snaps to Sponsored; ETH and USDV options are hidden; helper copy is shown
  • Session-key USDV send (including P-256) proceeds via sponsored path and no longer hits the unsupported gas-mode revert
  • Switching from session key back to owner restores the full gas option set

Made with Cursor

@linear

linear Bot commented Jul 24, 2026

Copy link
Copy Markdown
CHAIN-4779 Session-key USDV send can enter unsupported gas mode and fail

Using a P-256 session key to send USDV can fail during gas estimation with Gas estimate failed — this transaction would revert: RPC Request failed. The same flow can also revert on-chain when gas is set to Pay in USDV (EIP-8168).

The transaction composer currently allows a session-key signer to select a pay-gas option even though the flow should require a sponsored transaction.

Observed reverted transaction: Base explorer tx

screenshot showing the on-chain revert

screenshot showing the unsupported gas selection with a session key signer

Review in Linear

@cb-heimdall

cb-heimdall commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
omni-ui Ready Ready Preview, Comment Jul 24, 2026 4:08pm

Request Review

Session-key signers only support the EIP-8168 sponsored ("free") gas
path; leaving gasMode on eth/usdv while a session key is selected let
USDV (and other) sends reach estimation/submission and revert.

- Force gasMode to 'free' via useEffect as soon as txIsSession is true.
- Hide the ETH / USDV gas options in the Gas Select for session-key
  signers, leaving only Sponsored.
- Add a hard guard in doSignNative/doSponsoredSign that blocks and
  surfaces an error if a session-key signer is paired with a
  non-sponsored gas mode, as defense in depth against the UI state.

Co-authored-by: Cursor <cursoragent@cursor.com>

@mbeutt-cb mbeutt-cb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Fix looks good

@montycheese
montycheese merged commit ee3f178 into main Jul 24, 2026
6 checks passed
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.

3 participants