Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Refactor signers sign-transaction to use transaction messages (#2476)
Browse files Browse the repository at this point in the history
The signers now all take a `NewTransaction` as input. So these functions take a transaction message (with signers) and compile it to a `NewTransaction` before sending it to the signers.

I think this PR will enable me to remove the old signer functions and clean up/rename things back, but I'll do that in a separate PR to make it easier to review.
  • Loading branch information
mcintyre94 authored Apr 12, 2024
1 parent 1882615 commit 907cf1f
Show file tree
Hide file tree
Showing 5 changed files with 427 additions and 179 deletions.
6 changes: 3 additions & 3 deletions packages/signers/src/__tests__/__setup__.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@ export function createMockMessageModifyingSigner(

export function createMockTransactionPartialSigner(
address: Address,
): TransactionPartialSigner & { signTransactions: jest.Mock } {
): TransactionPartialSigner & { newSignTransactions: jest.Mock; signTransactions: jest.Mock } {
return { address, newSignTransactions: jest.fn(), signTransactions: jest.fn() };
}

export function createMockTransactionModifyingSigner(
address: Address,
): TransactionModifyingSigner & { modifyAndSignTransactions: jest.Mock } {
): TransactionModifyingSigner & { modifyAndSignTransactions: jest.Mock; newModifyAndSignTransactions: jest.Mock } {
return { address, modifyAndSignTransactions: jest.fn(), newModifyAndSignTransactions: jest.fn() };
}

export function createMockTransactionSendingSigner(
address: Address,
): TransactionSendingSigner & { signAndSendTransactions: jest.Mock } {
): TransactionSendingSigner & { newSignAndSendTransactions: jest.Mock; signAndSendTransactions: jest.Mock } {
return { address, newSignAndSendTransactions: jest.fn(), signAndSendTransactions: jest.fn() };
}

Expand Down
Loading

0 comments on commit 907cf1f

Please sign in to comment.