You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Submit and wait (JS): handle TRY_AGAIN_LATER and DUPLICATE, and don't treat a short poll as failure #2962
What's wrong:
This page defines the submitTx helper that several other guides reuse.
It throws on any send status other than PENDING (line 22). TRY_AGAIN_LATER means "resend later" and DUPLICATE means the network already has this transaction, so neither is a failure.
It polls only 5 times, 500 ms apart (2.5 seconds), and then treats NOT_FOUND as a failure (line 35). pollTransaction returns the last NOT_FOUND response when it runs out of attempts (v17.4.0 server.ts#L1259), so a transaction that is still pending reads as failed. A caller that retries at that point can send the payment twice.
Change needed:
Explain what each send status means and how to handle it, with TRY_AGAIN_LATER and DUPLICATE handled rather than thrown. Poll long enough for the transaction's time bound, and don't report NOT_FOUND as a failure.
Run submitTx against testnet with @stellar/stellar-sdk 17.x: a valid transaction returns SUCCESS.
Sending the same signed transaction twice doesn't throw on the second send.
Sending two transactions from one account back to back doesn't throw on TRY_AGAIN_LATER.
The guides that reuse submitTx still work.
pnpm validate passes.
Why it matters: Teams at HackMeridian 2026 learned these rules by losing transactions or nearly paying twice (Lotus, Koul, Ficha).
Related:#2562 and PR #2933 fix the undefined tmpStatus and status variables in the same function; this issue is about the send and poll logic. #2564 (cross-links to the SDK docs). The SDK's own send step also throws on anything but PENDING (v17.4.0 sent_transaction.ts#L85), so the SDK has no helper for this yet.
Activity
stellar-doxie commentedon Nov 1, 2026
🤖 Automated message from the Stellar Triage Bot.
I saw this issue. I have not started work on it, because nobody called me in yet.
How to reach me:
/triage, add thebot:takelabel, or assign @kaankacar, @ElliotFriend or @wmendes./triage stop. People with write permission can also add thebot:hands-offlabel.oceans404 commentedon Nov 1, 2026
/triage
stellar-doxie commentedon Nov 1, 2026
🤖 Automated message from the Stellar Triage Bot.
Working this because @oceans404 added
bot:take.I am checking the claims against the SDK and the live page now. I will report back with a PR or a question.
stellar-doxie commentedon Nov 1, 2026
🤖 Automated message from the Stellar Triage Bot.
Working this because @oceans404 added
bot:take.I opened #2977. The claims check out against SDK v17.4.0 and stellar-core.
submitTxnow resends onTRY_AGAIN_LATERand polls onDUPLICATE.maxTime, soNOT_FOUNDis never a failure.#2933 changes the same lines. The second PR to merge needs a small conflict fix.