Transaction Response with no fee attribute when fee = 0 - General - Algorand

Transaction Response with no fee attribute when fee = 0

post by francescamartinucci on Feb 27, 2025

Hi everyone! In my Java backend, when retrieving txn information with the indexer client, i find out that the chain response with all params of a txn with fee = 0 (because of part of a txn group where just one txn pays fees for all txns in the group itself) doesn’t contain the param fee. Therefore, the java algorand sdk, while parsing the chain response, gets fee as null and sets it as Account.MIN_TX_FEE_UALGOS. So, there’s no way to discriminate between 0 fee txn and a MinFee one.

Is there a reason to this behaviour?

Thank you in advance!

post by alexjordan_now on Mar 11, 2025

This behavior likely occurs because the indexer omits the ‘fee’ field when it’s explicitly set to 0. Since the SDK defaults to MIN_TX_FEE_UALGOS when parsing a null fee, distinguishing between a true zero-fee txn and a MinFee one becomes tricky.

post by francescamartinucci on Mar 11, 2025

Yeah, that’s exactly the same i wrote in the topic. So, nothing new, not solved yet! It sounds like a bug or a wrong management of the param fee in the java sdk.

post by BrianW on Mar 19, 2025

May I ask you to open a GitHub issue on the Java SDK repository so that the Algorand Technologies team who maintains the library can investigate this?

post by francescamartinucci on Mar 19, 2025

Sure, I’ll do it as soon as possible. Thanks for your reply.