Skip to content

fix: derive TokenID.equals from TokenID.Compare - #1820

Merged
Dosik13 merged 2 commits into
mainfrom
fix/token-id-equals
Aug 31, 2026
Merged

fix: derive TokenID.equals from TokenID.Compare#1820
Dosik13 merged 2 commits into
mainfrom
fix/token-id-equals

Conversation

@Dosik13

@Dosik13 Dosik13 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Description:

Fix TokenAirdropTransaction matching tokens with a comparison that ignored the token
number, so an airdrop carrying more than one token could attribute one token's transfers to
another. TransferTransaction was unaffected — it already compares full token IDs.

  • Derive TokenID.equals from TokenID.Compare so the two cannot disagree
  • Add multi-token unit coverage for each of the six builder loops that match on token ID
  • Add a multi-token airdrop integration test asserting on the transaction record
  • Move the shared token-transfer amount helper into utilities_for_test.go

Related issue(s):

Fixes #1805
Notes for reviewer:

Checklist

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

@lfdt-bot

lfdt-bot commented Aug 24, 2026

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 Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
sdk/token_id.go 80.70% <100.00%> (+80.70%) ⬆️

... and 203 files with indirect coverage changes

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

Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
@Dosik13
Dosik13 force-pushed the fix/token-id-equals branch from 288e231 to 48db2e5 Compare August 24, 2026 12:38
@Dosik13
Dosik13 marked this pull request as ready for review August 24, 2026 12:38
@Dosik13
Dosik13 requested review from a team as code owners August 24, 2026 12:38
@Dosik13
Dosik13 requested a review from gsstoykov August 24, 2026 12:38
@Dosik13
Dosik13 merged commit 5ff18bd into main Aug 31, 2026
16 checks passed
@Dosik13
Dosik13 deleted the fix/token-id-equals branch August 31, 2026 13:26
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.

Refactor TokenId

3 participants