Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

test: add coverage for signTransactionForSession#431

Open
yelistratov1994 wants to merge 1 commit intoAbstract-Foundation:mainfrom
yelistratov1994:test/sign-transaction-for-session
Open

test: add coverage for signTransactionForSession#431
yelistratov1994 wants to merge 1 commit intoAbstract-Foundation:mainfrom
yelistratov1994:test/sign-transaction-for-session

Conversation

@yelistratov1994
Copy link
Copy Markdown

@yelistratov1994 yelistratov1994 commented Apr 8, 2026

Adds direct unit coverage for signTransactionForSession.

Changes

  • add a direct action test file for signTransactionForSession
  • verify session hook data is passed through to signTransaction
  • verify customPaymasterHandler is forwarded
  • verify error handling for undeployed smart accounts
  • verify error handling when to is missing

Validation

  • pnpm --filter @abstract-foundation/agw-client typecheck
  • pnpm exec vitest run test/src/actions/signTransactionForSession.test.ts --environment node --reporter verbose

PR-Codex overview

This PR introduces unit tests for the signTransactionForSession function in the signTransactionForSession.test.ts file, ensuring it behaves as expected under various scenarios, including valid and invalid inputs.

Detailed summary

  • Added imports for necessary modules and types.
  • Created mock clients using createClient, createWalletClient, and createPublicClient.
  • Defined a sample transaction and session configuration.
  • Implemented tests for:
    • Successful transaction signing.
    • Forwarding a custom paymaster handler.
    • Handling errors for un-deployed smart accounts.
    • Validating the presence of the transaction to field.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 8, 2026

⚠️ No Changeset found

Latest commit: d12bb98

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant