Skip to content

chore: replace tron logger with shared util - #147

Merged
taran-a merged 1 commit into
mainfrom
chore/replace-tron-logger-with-shared-util
Aug 18, 2026
Merged

chore: replace tron logger with shared util#147
taran-a merged 1 commit into
mainfrom
chore/replace-tron-logger-with-shared-util

Conversation

@taran-a

@taran-a taran-a commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Explanation

Replace Tron logger with shared util class.
Use LOG_LEVEL=silent prod env variable to disable logger.

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

@taran-a
taran-a requested review from a team as code owners August 11, 2026 10:19
@taran-a
taran-a deployed to default-branch August 11, 2026 10:19 — with GitHub Actions Active
Comment thread eslint-suppressions.json

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.

Great stuff 🧹

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.

We must not forget to add this to the CI... And we must also not forget that this will introduce shasum shenanigans due to local VS CI mismatch 🐒

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think all good as we already have this in CI, because bitcoin uses this approach

} as unknown as ILogger;
trace: jest.fn(),
withPrefix: (prefix: string): Logger => createPrefixedLogger([prefix]),
} as unknown as jest.Mocked<Logger>;

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.

Do we still need the unknown?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah because the withPrefix method is tricky to mock

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.

Can't we just delete ♻️ this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we could delete it but I left it to lower required changes since we need to import from some file anyway

@taran-a
taran-a force-pushed the chore/replace-tron-logger-with-shared-util branch from 99f0575 to 4c09148 Compare August 18, 2026 11:30
@taran-a

taran-a commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@github-actions

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/bitcoin-wallet-snap@2.0.1-preview-4c09148
@metamask-previews/snap-networks-utils@1.0.0-preview-4c09148
@metamask-previews/solana-wallet-snap@6.0.0-preview-4c09148
@metamask-previews/tron-wallet-snap@3.1.0-preview-4c09148

@taran-a
taran-a added this pull request to the merge queue Aug 18, 2026
Merged via the queue into main with commit b742626 Aug 18, 2026
49 checks passed
@taran-a
taran-a deleted the chore/replace-tron-logger-with-shared-util branch August 18, 2026 12:41
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