Skip to content

fix: honor payment tx id if present - #1790

Merged
Dosik13 merged 1 commit into
hiero-ledger:mainfrom
radkomih:fix/1782-honor-payment-transaction-id
Jul 27, 2026
Merged

fix: honor payment tx id if present#1790
Dosik13 merged 1 commit into
hiero-ledger:mainfrom
radkomih:fix/1782-honor-payment-transaction-id

Conversation

@radkomih

Copy link
Copy Markdown
Contributor

Description:

Honor SetPaymentTransactionID when generating query payments so an explicitly-set payment transaction ID is used instead of being silently replaced by a freshly generated one.

  • Update Query.generatePayments to use the payment transaction ID set via SetPaymentTransactionID when present, falling back to auto-generation otherwise
  • Re-enable the previously skipped TestUnitContractInfoQueryGetTransactionIDMock

Related issue(s):

Fixes #1782

Notes for reviewer:

The setter stored the ID in q.paymentTransactionIDs, but generatePayments always called TransactionIDGenerate(...) and never read it back, so the setter was a no-op across all query types. The fix reads the current ID from the slice when it is non-empty.

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Rado M <radkomih@gmail.com>
@radkomih radkomih self-assigned this Jul 24, 2026
@radkomih
radkomih requested review from a team as code owners July 24, 2026 07:11
@radkomih
radkomih requested review from Dosik13 and gsstoykov July 24, 2026 07:11
@lfdt-bot

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
sdk/query.go 86.38% <100.00%> (+0.29%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Dosik13 Dosik13 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm!

@Dosik13
Dosik13 merged commit 97a7213 into hiero-ledger:main Jul 27, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Intermediate]: Honor SetPaymentTransactionID in query payment generation and re-enable ContractInfoQuery test

3 participants