Skip to content

Conversation

@DeVikingMark
Copy link

@DeVikingMark DeVikingMark commented May 18, 2025

This PR addresses the TODO comment in signTransaction.ts by introducing a proper
typing for EIP712 transactions instead of using as any type assertions.

Changes:

  • Added a TransactionWithType helper type that extends ZksyncTransactionRequest
  • Replaced inline "as any" casts with the proper type
  • Made the code more type-safe while maintaining compatibility with the viem library

These changes improve code quality and type safety without changing the actual behavior.


PR-Codex overview

This PR introduces a new type helper for handling EIP-712 transactions in the signTransaction functionality, ensuring proper type assignment for transactions and enhancing type safety.

Detailed summary

  • Added a new type TransactionWithType for EIP-712 transactions.
  • Updated signEip712TransactionInternal to properly assign the transaction type.
  • Modified type casting for transaction to utilize TransactionWithType.

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

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.

1 participant