Skip to content

Commit

Permalink
Correct the type of getComputeUnitEstimateForTransactionMessage (#2905
Browse files Browse the repository at this point in the history
)
  • Loading branch information
steveluscher authored Jul 3, 2024
1 parent 798651e commit 56fde06
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/rare-goats-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@solana/web3.js-experimental': patch
---

Fixed the type of `config` on `getComputeUnitEstimateForTransactionMessage`. It is now optional and does not include `transactionMessage`.
5 changes: 4 additions & 1 deletion packages/library/src/compute-limit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ type ComputeUnitEstimateForTransactionMessageFactoryConfig = Readonly<{
}>;
type ComputeUnitEstimateForTransactionMessageFunction = (
transactionMessage: CompilableTransactionMessage | (ITransactionMessageWithFeePayer & TransactionMessage),
config: Omit<Parameters<typeof getComputeUnitEstimateForTransactionMessage_INTERNAL_ONLY_DO_NOT_EXPORT>[0], 'rpc'>,
config?: Omit<
Parameters<typeof getComputeUnitEstimateForTransactionMessage_INTERNAL_ONLY_DO_NOT_EXPORT>[0],
'rpc' | 'transactionMessage'
>,
) => Promise<number>;

export function getComputeUnitEstimateForTransactionMessageFactory({
Expand Down

0 comments on commit 56fde06

Please sign in to comment.