Skip to content

test: fix wallet-internals fee call, paginate events, tighten asserts - #20

Merged
IlyasRidhuan merged 1 commit into
stack/reenable-testsfrom
stack/test-layer-fixes
Aug 12, 2026
Merged

test: fix wallet-internals fee call, paginate events, tighten asserts#20
IlyasRidhuan merged 1 commit into
stack/reenable-testsfrom
stack/test-layer-fixes

Conversation

@alejoamiras

@alejoamiras alejoamiras commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

What

Test-layer fixes from the modernization audit (all TS + comments, no contract changes):

  • completeFeeOptions latent bug: our WalletWithInternals typed the pre-5.1.0 three-positional-arg signature; the real BaseWallet method takes a single options bag, so the passed AztecAddress destructured to all-undefined and only worked because the defaults happened to fit a fee-less call. Fixed, and the three duplicated commitment helpers are factored into one proveExtractAndSendCommitment with a shape guard on the nested execution results.
  • TODO rewritten as a warning: the old "replace with simulate() + send()" TODOs described a migration that would be a correctness buginitialize_transfer_commitment draws fresh randomness per execution, so a simulated commitment never matches the sent tx. No public API exposes private return values at 5.1.0; the comment now says so.
  • Event pagination: getPublicEvents returns one page per call; the three event helpers now follow nextCursor instead of silently truncating.
  • Tightened assertion: the NFT access-control test matched any error; it now matches the auth failure specifically.
  • Comment accuracy: vault deploy NOTE updated (salt is settable via DeployOptions::with_salt since v5.1.0 — the actual blocker is the high-level deploy path hardcoding a zero deployer); escrow TXE-oracle citation bumped to v5.1.0 (values re-verified unchanged).

Validation

token 5/5 · nft 9/9 · multitoken 13/13 against a local network; prettier clean.

🤖 Generated with Claude Code

- WalletWithInternals.completeFeeOptions declared the pre-5.1.0 3-arg
  signature; the real BaseWallet method takes a single options bag, so
  the caller-side AztecAddress destructured to all-undefined and only
  worked because the defaults happened to fit. Fix the signature, factor
  the three duplicated commitment helpers into one
  proveExtractAndSendCommitment, and guard the nested-result shape.
- Rewrite the 'replace with simulate() + send()' TODOs: that migration
  is unsound (the commitment derives from randomness drawn fresh per
  execution) and no public API exposes private return values at 5.1.0.
- Follow getPublicEvents nextCursor in the three event helpers instead
  of silently truncating at one page.
- nft access-control test: match the auth failure message instead of
  accepting any error.
- Fix the vault deploy NOTE (salt is settable via DeployOptions since
  v5.1.0; the actual blocker is the high-level path hardcoding a zero
  deployer) and bump the escrow TXE-oracle citation to v5.1.0.

Validated: token 5/5, nft 9/9, multitoken 13/13 against a local
network.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@IlyasRidhuan
IlyasRidhuan force-pushed the stack/test-layer-fixes branch from 0b4abd1 to 30bd788 Compare August 12, 2026 16:40
@IlyasRidhuan
IlyasRidhuan merged commit 1317545 into main Aug 12, 2026
4 of 7 checks passed
@alejoamiras
alejoamiras deleted the stack/test-layer-fixes branch August 12, 2026 17:00
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