diff --git a/.changeset/rare-goats-sell.md b/.changeset/rare-goats-sell.md new file mode 100644 index 00000000000..e1c66ad0679 --- /dev/null +++ b/.changeset/rare-goats-sell.md @@ -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`. diff --git a/packages/library/src/compute-limit.ts b/packages/library/src/compute-limit.ts index 2fa50bebe14..82865bce7a1 100644 --- a/packages/library/src/compute-limit.ts +++ b/packages/library/src/compute-limit.ts @@ -12,7 +12,10 @@ type ComputeUnitEstimateForTransactionMessageFactoryConfig = Readonly<{ }>; type ComputeUnitEstimateForTransactionMessageFunction = ( transactionMessage: CompilableTransactionMessage | (ITransactionMessageWithFeePayer & TransactionMessage), - config: Omit[0], 'rpc'>, + config?: Omit< + Parameters[0], + 'rpc' | 'transactionMessage' + >, ) => Promise; export function getComputeUnitEstimateForTransactionMessageFactory({