fix(app): sponsor all txs, drop self-pay fallback masking "No valid gas coins"#353
Merged
Conversation
…as coins" useSponsoredTransaction no longer falls back to direct self-pay when the Enoki sponsor step fails. On a gasless zkLogin wallet (0 SUI) that fallback always aborted in the Sui SDK gas resolver with "No valid gas coins found for the transaction.", masking the real cause (network blip, relayer 429/5xx, sponsor dry-run rejection). Now every user — zkLogin and regular wallet — is gaslessly sponsored: retry the sponsor flow on transient failures (429/500/503/504/408 + network) with backoff, and surface the real reason otherwise. 502 (Enoki dry-run rejection, e.g. duplicate delegate key) fails fast. Public API unchanged.
harrymove-ctrl
approved these changes
Jul 9, 2026
Resolve conflict in useSponsoredTransaction.ts: keep the no-fallback retry version. dev's changes to this file (executeTransactionCompat wiring and the Transaction.fromKind fallback rebuild from the gRPC migration) only served the self-pay fallback path this PR deletes, so they are dropped along with the now-dead executeTransactionCompat helper and its stale App.tsx comment reference.
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.
Summary
Lands the app-side hotfix currently deployed on the app service: always route transactions through the Enoki sponsor and drop the self-pay fallback.
Previously, when the sponsor step failed (transient network / 502 dup-key / 429 / 500), the app fell back to self-paying from the user's zkLogin wallet. On a 0-SUI zkLogin wallet that self-pay attempt surfaced as a misleading "No valid gas coins" error, masking the real sponsor failure.
Change
apps/app/src/hooks/useSponsoredTransaction.ts— sponsor all txs; remove the self-pay fallback path so the true sponsor error surfaces instead of the masked gas error.Notes
fix/sponsor-remove-selfpay-fallback); this PR merges it back intodev.