WIP: Draft: fix(frontend): recover from account sequence mismatch on mint (#499) #1037

Closed
PlasticDigits wants to merge 0 commits from 499-mint-page-recover-from-account-sequence-mismatch-fetch-sequence-at-sign-time-auto-retry-on-code-32- into main
PlasticDigits commented 2026-07-25 04:33:54 +00:00 (Migrated from gitlab.com)

Summary

  • Refresh Cosmes wallet account sequence at sign time (getAuthInfo(false)) so Mint/other txs do not reuse a stale cached sequence when the same account is active elsewhere.
  • On Cosmos CheckTx code-32 (account sequence mismatch), re-sign and re-broadcast once using the chain-expected sequence via shared broadcastTerraExecuteContracts (not Mint-page-only logic; not #359 recovery).
  • After a failed retry, surface short retail copy Wallet out of sync. Try again. (anti cognitive overload / #489); raw chain text stays in console.error.

Issue criteria

  • Fetch account sequence at signing time
  • Auto-retry once on code-32 sequence mismatch
  • Friendly short message after retry still fails (minimized per issue note / #489)
  • UI expandable/raw-error disclosure on Mint — not done; diagnostics remain in console (consistent with existing error funnel)

Test plan

  • terraAccountSequence unit tests
  • terraBroadcastRecovery code-32 retry success + no #359 recovery
  • humanizeTerraTxError sequence mismatch mapping
  • Related broadcast/transactions/MintPage suites (108 tests) + retest of core suites
  • Manual: Mint TOPAZ on mainnet/soft-launch with a concurrently active signer; first mismatch should auto-retry; persistent mismatch shows short copy

Docs / invariants

  • docs/frontend.md broadcast invariants (#499)
  • Soft-launch F14 in docs/runbooks/soft-launch-faucet.md
  • Skills: AGENTS_FRONTEND_TX_BROADCAST_TIMEOUT.md, AGENTS_SOFT_LAUNCH_FAUCET.md, AGENTS_FRONTEND_USER_ERRORS.md

Closes #499

Closes #499

## Summary - Refresh Cosmes wallet account sequence at sign time (`getAuthInfo(false)`) so Mint/other txs do not reuse a stale cached sequence when the same account is active elsewhere. - On Cosmos CheckTx code-32 (`account sequence mismatch`), re-sign and re-broadcast **once** using the chain-expected sequence via shared `broadcastTerraExecuteContracts` (not Mint-page-only logic; not #359 recovery). - After a failed retry, surface short retail copy **`Wallet out of sync. Try again.`** (anti cognitive overload / #489); raw chain text stays in `console.error`. ## Issue criteria - [x] Fetch account sequence at signing time - [x] Auto-retry once on code-32 sequence mismatch - [x] Friendly short message after retry still fails (minimized per issue note / #489) - [ ] UI expandable/raw-error disclosure on Mint — **not done**; diagnostics remain in console (consistent with existing error funnel) ## Test plan - [x] `terraAccountSequence` unit tests - [x] `terraBroadcastRecovery` code-32 retry success + no #359 recovery - [x] `humanizeTerraTxError` sequence mismatch mapping - [x] Related broadcast/transactions/MintPage suites (108 tests) + retest of core suites - [ ] Manual: Mint TOPAZ on mainnet/soft-launch with a concurrently active signer; first mismatch should auto-retry; persistent mismatch shows short copy ## Docs / invariants - `docs/frontend.md` broadcast invariants (#499) - Soft-launch **F14** in `docs/runbooks/soft-launch-faucet.md` - Skills: `AGENTS_FRONTEND_TX_BROADCAST_TIMEOUT.md`, `AGENTS_SOFT_LAUNCH_FAUCET.md`, `AGENTS_FRONTEND_USER_ERRORS.md` Closes #499 Closes #499
ghost1 commented 2026-07-25 04:33:56 +00:00 (Migrated from gitlab.com)

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot) to get automatic reviews on future PRs.
PlasticDigits (Migrated from gitlab.com) closed this pull request 2026-07-25 04:34:09 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!1037
No description provided.