Skip to content

chore(tron-wallet-snap): remove unused TRC20 log parser - #234

Merged
Battambang merged 1 commit into
mainfrom
chore/tron-remove-unused-trc20-log-parser
Aug 28, 2026
Merged

chore(tron-wallet-snap): remove unused TRC20 log parser#234
Battambang merged 1 commit into
mainfrom
chore/tron-remove-unused-trc20-log-parser

Conversation

@Battambang

Copy link
Copy Markdown
Contributor

Explanation

trc20LogParser was added in the archived snap-tron-wallet#337 ([1/3]) and snap-tron-wallet#338 ([2/3]) as a fallback when TronGrid’s address-level TRC20 index lags, which can make a TRX→TRC20 swap look like a plain send. Those PRs only added helpers and tests. The follow-up that would have called them from transaction sync ([3/3]) never landed.
Nothing in TransactionsService, TransactionsMapper, or the snap entrypoint imports this module. #enrichPotentialSwaps still uses getTransactionInfoById only for internal_transactions, not event logs.

This PR deletes the unused implementation and its tests. Live TronGrid TRC20 fetch/mapping and full-node types (including log) stay as they are.

This pull request removes the trc20LogParser.test.ts test file and its related test code, as well as the implementation file trc20LogParser.ts, from the tron-wallet-snap package. These files contained the logic and tests for parsing TRC20 transfer logs, reconstructing transfer asset types, and building contract transaction info objects for TRC20 tokens. The removal suggests a refactor or deprecation of the TRC20 log parsing functionality.

The most important changes are:

Removal of TRC20 log parsing functionality

  • Deleted the entire trc20LogParser.ts file, which included all logic for parsing TRC20 transfer logs, reconstructing transfer asset types, and building contract transaction info objects.

Removal of related tests

  • Deleted the trc20LogParser.test.ts file, which contained comprehensive tests for the TRC20 log parser, including various edge cases and integration with token metadata.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

The helpers from snap-tron-wallet PRs 337/338 were never wired into
transaction mapping, so they only added unused surface area.
@Battambang
Battambang requested a review from a team as a code owner August 28, 2026 13:36
@Battambang
Battambang deployed to default-branch August 28, 2026 13:36 — with GitHub Actions Active
@Battambang
Battambang added this pull request to the merge queue Aug 28, 2026
Merged via the queue into main with commit 7d7015e Aug 28, 2026
58 of 59 checks passed
@Battambang
Battambang deleted the chore/tron-remove-unused-trc20-log-parser branch August 28, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants