Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addSignersToTransactionMessage should upgrade feePayer to a signer #82

Open
steveluscher opened this issue Jan 29, 2025 · 1 comment
Open
Assignees
Labels
enhancement New feature or request

Comments

@steveluscher
Copy link
Collaborator

Motivation

Imagine a transaction message with a non-signer fee payer, having address 'abc'. Imagine a signer also having address 'abc'.

If you call addSignersToTransactionMessage() on that message, it should notice that the fee payer address matches the signer address, and should ‘upgrade’ the feePayer to a signer.

Example use case

const message = pipe(
      createTransactionMessage({ version: 0 }),
      m => setTransactionMessageFeePayer(signer.address, m), // non-signer version of this function
      m => addSignersToTransactionMessage([signer], m),
);
message.feePayer satisfies TransactionSigner<'abc'>;
@lorisleiva
Copy link
Member

Thanks! I'll tackle this as soon as I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants