Skip to content

fix: wait for pauser transaction receipts - #238

Open
Kewe63 wants to merge 1 commit into
t1protocol:canaryfrom
Kewe63:fix/237-wait-for-pauser-receipts
Open

Kewe63 wants to merge 1 commit into
t1protocol:canaryfrom
Kewe63:fix/237-wait-for-pauser-receipts

Conversation

@Kewe63

@Kewe63 Kewe63 commented Sep 19, 2026

Copy link
Copy Markdown

Description

  • Wait for pauseOpen and unpauseOpen transaction receipts before returning from the client write methods.
  • Preserve the original transaction hash return value after confirmation.
  • Add focused regression coverage for both pause and unpause transaction lifecycles.

Motivation and Context

The intent pauser polls contract state sequentially. Previously, T1ERC7683Client.pauseOpen() and unpauseOpen() returned as soon as walletClient.writeContract() produced a broadcast hash. If the next poll read stale RPC state while that transaction was still pending, the monitor submitted the same state transition again.

Waiting for the receipt keeps the current monitor iteration in flight until the transaction is confirmed or the Viem receipt wait fails. The next poll therefore cannot rebroadcast the same action while the prior transaction remains pending.

Fixes #237.

How Has This Been Tested?

  • Pre-fix regression run: 0 passed, 2 failed; neither write method called waitForTransactionReceipt.
  • bun test test/T1ERC7683Client.receipt.test.ts — 2 passed, 0 failed.
  • bun test — 2 passed, 0 failed on this branch.
  • Direct TypeScript check of the changed source and test — passed:
    • bun x tsc --noEmit --target ESNext --module Preserve --moduleResolution Bundler --types bun --skipLibCheck --allowImportingTsExtensions src/T1ERC7683Client.ts test/T1ERC7683Client.receipt.test.ts
  • Synthetic combined tree with open PRs fix: parse CoinGecko price response #232, fix: preserve fractional token value #234, and fix: bound CoinGecko price requests #236:
    • All four PR heads were verified as ancestors of the tested combined commit.
    • bun test — 9 passed, 0 failed across four focused intent-pauser test files.
    • Direct TypeScript check of the two changed source files and all four test files — passed.
  • git diff --check — passed.
  • bun x tsc -p tsconfig.json --noEmit remains blocked on unchanged canary by the missing generated ../../contracts/artifacts/src/T1ERC7683.sol/T1ERC7683.json artifact; the same error reproduces on the clean audited checkout.

Types of changes (remove all unchecked types)

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I assessed the documentation impact; no documentation update is required.
  • I assessed the deployment-script impact; no deployment-script update is required.
  • I added focused regression coverage for pause and unpause receipt handling.

Wait for pause and unpause transaction receipts before the monitor proceeds to another poll, preventing stale RPC state from triggering duplicate writes.\n\nFixes t1protocol#237.
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.

Intent pauser rebroadcasts state transitions while the previous transaction is pending

1 participant