hedera-docs icon indicating copy to clipboard operation
hedera-docs copied to clipboard

submit-a-message - setMaxCustomFees is not a function

Open franfernandez20 opened this issue 7 months ago • 1 comments

Description

The function setMaxCustomFees does not exist in TopicMessageTransaction.
It seems to have been confused with setCustomFeeLimits.

    setCustomFeeLimits(customFeeLimits: CustomFeeLimit[]): this;
    /**
     * Adds a maximum custom fee that the user is willing to pay for message submission.
     * @param {CustomFeeLimit} customFeeLimit
     * @returns {this}
     */

Image

Steps to reproduce

Run the code:

// Create the transaction
  const transaction = await new TopicMessageSubmitTransaction()
    .setTopicId("topicId")
    .setMessage("Hello, HCS!")
    .setMaxCustomFees(3); // Set max custom fees if applicable

  // Execute transaction
  const txResponse = await transaction.execute(client);

Additional context

No response

Hedera network

testnet

Version

v2.64.5

Operating system

None

franfernandez20 avatar May 21 '25 13:05 franfernandez20

@franfernandez20 thanks so much for submitting this bug. we'll confirm with the SDK team to ensure we make the updates with the correct function!

theekrystallee avatar May 21 '25 14:05 theekrystallee