Repository navigation
chore(tron): type unvalidated API payloads in the Tron services - #624
Open
ulissesferreira wants to merge 1 commit into
Open
ulissesferreira wants to merge 1 commit into
ulissesferreira wants to merge 1 commit into
Conversation
ulissesferreira
temporarily deployed
to
default-branch
November 17, 2026 01:41 — with
GitHub Actions
Inactive
ulissesferreira
force-pushed
the
chore/tron-lint-suppressions-service-source-any
branch
from
November 18, 2026 09:41
26dd990 to
9ddefdc
Compare
|
This branch was previously deployed
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.



Description
Removes the
typescript/no-unsafe-*suppressions for the Tron services that consume unvalidated API and TronWeb payloads (73 violations across 6 files). Every fix is a typing change:anyvalues are replaced by real types, or byunknownnarrowed withhasProperty()own-property checks plustypeofguards, so no runtime behaviour changes. Noanycasts,@ts-expect-error, or lint suppressions were added.Changes
packages/tron-wallet-snap/src/services/confirmation/ConfirmationHandler.ts— typed thedeserializeTransactionresult asTronwebTypes.Transaction['raw_data'](validated byassertTransactionStructureright after) (no-unsafe-assignment,no-unsafe-argument)packages/tron-wallet-snap/src/services/send/SendService.ts— typed thetxJsonToPbprotobuf handle asunknown; it is only passed back into TronWeb helpers (no-unsafe-assignment)packages/tron-wallet-snap/src/services/transaction-expiration-refresher/TransactionExpirationRefresherService.ts— sametxJsonToPbhandle typing (no-unsafe-assignment)packages/tron-wallet-snap/src/services/transactions/TransactionsMapper.ts— addedreadString/readNumber/readCallValuesown-property readers for the Full Nodecaller_address/transferTo_address/callValueInfo/call_value/contract_address/frozen_balance_v2fields and dropped theas anycasts on those sites (no-unsafe-member-access,no-unsafe-assignment,no-unsafe-call,no-unsafe-argument,no-unsafe-return)packages/tron-wallet-snap/src/services/transactions/TransactionsService.ts— narrowedcall_valuewithhasProperty()+typeofinstead of casting the contract value toany(no-unsafe-member-access)packages/tron-wallet-snap/src/services/wallet/WalletService.ts—catchclauses now takeunknownand readcode/messagethroughgetErrorCode/getErrorMessageown-property readers, dropped the(signedTx as any).signaturecast (TronWeb typessignature: string[]), typed the deserialized transaction, and removed the redundantparams as anyaftervalidateRequestalready narrowed it (no-unsafe-assignment,no-unsafe-member-access,no-unsafe-call,no-unsafe-argument)oxlint-suppressions.json— regenerated with--prune-suppressionsQuality gates
yarn lint:oxlint packages/tron-wallet-snap— clean, 6 suppressions entries (73 violations) removedtsc --noEmit— cleanvitest run— 63 files / 1052 tests passoxfmt --check— clean