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

Correct the return type of simulateTransaction when accounts are not loaded #2865

Conversation

steveluscher
Copy link
Contributor

This was returning accounts: null at the top level instead of inside value

See 7192f3d

Copy link

changeset-bot bot commented Jun 27, 2024

🦋 Changeset detected

Latest commit: 5bb7d21

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 37 packages
Name Type
@solana/rpc-api Patch
@solana/rpc Patch
@solana/sysvars Patch
@solana/web3.js-experimental Patch
@solana/rpc-graphql Patch
@solana/transaction-confirmation Patch
@solana/accounts Patch
@solana/addresses Patch
@solana/assertions Patch
@solana/codecs-core Patch
@solana/codecs-data-structures Patch
@solana/codecs-numbers Patch
@solana/codecs-strings Patch
@solana/codecs Patch
@solana/compat Patch
@solana/errors Patch
@solana/fast-stable-stringify Patch
@solana/functional Patch
@solana/instructions Patch
@solana/keys Patch
@solana/options Patch
@solana/programs Patch
@solana/react Patch
@solana/rpc-parsed-types Patch
@solana/rpc-spec-types Patch
@solana/rpc-spec Patch
@solana/rpc-subscriptions-api Patch
@solana/rpc-subscriptions-spec Patch
@solana/rpc-subscriptions-transport-websocket Patch
@solana/rpc-subscriptions Patch
@solana/rpc-transformers Patch
@solana/rpc-transport-http Patch
@solana/rpc-types Patch
@solana/signers Patch
@solana/transaction-messages Patch
@solana/transactions Patch
@solana/webcrypto-ed25519-polyfill Patch

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

steveluscher referenced this pull request Jun 27, 2024
@steveluscher steveluscher force-pushed the 06-27-correct_the_return_type_of_simulatetransaction_when_accounts_are_not_loaded branch from f1baa9e to 5bb7d21 Compare June 27, 2024 21:33
@@ -127,7 +127,7 @@ export interface SimulateTransactionApi extends RpcApiMethods {
simulateTransaction(
base58EncodedWireTransaction: Base58EncodedBytes,
config?: SigVerifyAndReplaceRecentBlockhashConfig & SimulateTransactionConfigBase,
): SimulateTransactionApiResponseBase & { accounts: null };
): SimulateTransactionApiResponseBase & SolanaRpcResponse<{ readonly accounts: null }>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this points out a broader issue.

In lots of places, we're including the RpcResponse wrapper in the "base response", but in others, we do something like:

RpcResponse<Base & { ... }>

I think it should always be the latter. I'll make a note to comb for this in my pass over RPC stuff.

@steveluscher steveluscher merged commit daf9691 into master Jun 28, 2024
8 checks passed
@steveluscher steveluscher deleted the 06-27-correct_the_return_type_of_simulatetransaction_when_accounts_are_not_loaded branch June 28, 2024 00:18
Copy link
Contributor

🎉 This PR is included in version 1.93.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants