Skip to content

fix(app): sponsor all txs, drop self-pay fallback masking "No valid gas coins"#353

Merged
ducnmm merged 2 commits into
devfrom
fix/sponsor-remove-selfpay-fallback
Jul 10, 2026
Merged

fix(app): sponsor all txs, drop self-pay fallback masking "No valid gas coins"#353
ducnmm merged 2 commits into
devfrom
fix/sponsor-remove-selfpay-fallback

Conversation

@ducnmm

@ducnmm ducnmm commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

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

…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 harrymove-ctrl self-requested a review July 9, 2026 05:17
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.
@railway-app railway-app Bot temporarily deployed to Walrus Memory / production July 10, 2026 11:59 Inactive
@ducnmm ducnmm merged commit 96f6fab into dev Jul 10, 2026
10 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.

2 participants