chore(tron-wallet-snap): remove unused TRC20 log parser - #234
Merged
Conversation
The helpers from snap-tron-wallet PRs 337/338 were never wired into transaction mapping, so they only added unused surface area.
taran-a
approved these changes
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tstest file and its related test code, as well as the implementation filetrc20LogParser.ts, from thetron-wallet-snappackage. 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
trc20LogParser.tsfile, which included all logic for parsing TRC20 transfer logs, reconstructing transfer asset types, and building contract transaction info objects.Removal of related tests
trc20LogParser.test.tsfile, which contained comprehensive tests for the TRC20 log parser, including various edge cases and integration with token metadata.References
Checklist