Skip to content

fix(wallet): make Stellar payment submission idempotent across ambigu… - #427

Open
Ukorstack wants to merge 1 commit into
EF-CHAIN:mainfrom
Ukorstack:fix/197-stellar-idempotent-submission
Open

fix(wallet): make Stellar payment submission idempotent across ambigu…#427
Ukorstack wants to merge 1 commit into
EF-CHAIN:mainfrom
Ukorstack:fix/197-stellar-idempotent-submission

Conversation

@Ukorstack

Copy link
Copy Markdown
Contributor

…ous outcomes (#197)

Build and sign the transaction envelope once before the retry loop, and reuse the exact same signed envelope across ambiguous retries (timeout / connection loss). After any ambiguous outcome, query Horizon by the pre-computed transaction hash: if the transaction landed, return success immediately instead of resubmitting, preventing duplicate payments. The envelope is only rebuilt with a fresh sequence number on a genuine tx_bad_seq conflict.

What changed

Why

Related issue

Closes #N

Tests added

How to test

Checklist

  • npm test passes and new backend logic has tests in apps/api/test/
  • This pull request changes no more than two implementation files
  • Documentation is updated if behavior changed (or this is not applicable)
  • Frontend changes lint and build (npm run lint/npm run build --workspace=apps/<app>)
  • No secrets, private keys, or .env files committed
  • Secret scan passes (CI green or run ./scripts/secret-scan-self-test.sh locally)
  • New environment variables are documented in .env.example and the README
  • Security/data-model implications considered (see SECURITY.md)

Screenshots / notes (for UI changes)

closes #228

…ous outcomes (EF-CHAIN#197)

Build and sign the transaction envelope once before the retry loop, and
reuse the exact same signed envelope across ambiguous retries (timeout /
connection loss). After any ambiguous outcome, query Horizon by the
pre-computed transaction hash: if the transaction landed, return success
immediately instead of resubmitting, preventing duplicate payments. The
envelope is only rebuilt with a fresh sequence number on a genuine
tx_bad_seq conflict.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated
send-am-admin Skipped Skipped Sep 1, 2026 2:10pm UTC
senda Skipped Skipped Sep 1, 2026 2:10pm UTC

@vercel
vercel Bot temporarily deployed to Preview – senda September 1, 2026 14:10 Inactive
@vercel
vercel Bot temporarily deployed to Preview – send-am-admin September 1, 2026 14:10 Inactive
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.

Continuously test alert delivery

1 participant