Closed lorisleiva closed 1 week ago
Latest commit: 6ea686ef2f7dcfa15df9d6d005e48e77001b8ac4
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @lorisleiva and the rest of your teammates on Graphite
I think that since there's some value in exporting the helper functions for single sending signer transaction messages, it may be cleaner to keep the type as well so their implementation is consistent to some of the other assertions we provided that use an opaque type.
I don't feel too strongly about it though, so I can kill the type if you feel that's a better move.
Totally up to you. It's just literally usable for nothing, until someone marks an input to a new function as requiring ITransactionMessageWithSingleSendingSigner
, right?
I'm leaning towards leaving it in. Otherwise the assertIs*
and is*
helper methods no longer narrow down the type which makes them less valuable — even though we don't make use of that type internally.
Fixes https://github.com/solana-labs/solana-web3.js/issues/2818
This PR calls the
assertIsTransactionMessageWithSingleSendingSigner
inside thesignAndSendTransactionMessageWithSigners
so the end-user doesn't need to do it explicitly.This is partly to improve the developer experience and partly because TS doesn't fail properly when the transaction message hasn't been asserted on prior to calling the sign and send function.
Note that I did not remove the
assertIsTransactionMessageWithSingleSendingSigner
and theisTransactionMessageWithSingleSendingSigner
from the package's exports since they may still be useful for custom use-cases such as the one described in the documentation: