Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/swapper/src/swappers/RelaySwapper/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import {
soneiumChainId,
sonicChainId,
storyChainId,
tronChainId,
unichainChainId,
worldChainChainId,
zkSyncEraChainId,
Expand Down Expand Up @@ -87,7 +86,11 @@ export const chainIdToRelayChainId = {
[gnosisChainId]: gnosis.id,
[avalancheChainId]: avalanche.id,
[bscChainId]: bsc.id,
[tronChainId]: 728126428,
// DISABLED: Tron deposits are built as simple TRC20 transfers instead of depositErc20() vault calls,
// and the Relay indexer notification is never sent for non-EVM chains. This causes deposits to be
// untracked by Relay, resulting in stuck/lost funds. Re-enable once the Tron transaction building
// is verified to use the Relay quote calldata (depositErc20) correctly.
// [tronChainId]: 728126428,
Comment on lines +89 to +93

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.

⚠️ Potential issue | 🟡 Minor

Remove the explanatory comment block (comments disallowed here).

Lines 89-93 add comments explaining prior behavior and the change; this violates the repo rule to avoid new comments and to avoid comments that describe changes. Please remove the comment block and keep the code change only, and capture rationale in the PR description or an issue.

Proposed diff
-  // DISABLED: Tron deposits are built as simple TRC20 transfers instead of depositErc20() vault calls,
-  // and the Relay indexer notification is never sent for non-EVM chains. This causes deposits to be
-  // untracked by Relay, resulting in stuck/lost funds. Re-enable once the Tron transaction building
-  // is verified to use the Relay quote calldata (depositErc20) correctly.
-  // [tronChainId]: 728126428,

As per coding guidelines “Never add code comments unless explicitly requested” and “When modifying code, do not add comments that reference previous implementations or explain what changed. Comments should only describe the current logic and functionality.”

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// DISABLED: Tron deposits are built as simple TRC20 transfers instead of depositErc20() vault calls,
// and the Relay indexer notification is never sent for non-EVM chains. This causes deposits to be
// untracked by Relay, resulting in stuck/lost funds. Re-enable once the Tron transaction building
// is verified to use the Relay quote calldata (depositErc20) correctly.
// [tronChainId]: 728126428,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/swapper/src/swappers/RelaySwapper/constant.ts` around lines 89 - 93,
Remove the explanatory comment block (the multi-line comment about Tron deposits
and Relay indexer) added in constant.ts and leave only the code (e.g., the
commented-out entry [tronChainId]: 728126428 if desired), so no new descriptive
comments remain in the file; capture the rationale in the PR description or an
issue instead. Ensure you remove lines that begin with the comment markers
around the Tron explanation and do not add any other comments describing past
implementations or changes.

[monadChainId]: monad.id,
[hyperEvmChainId]: hyperEvm.id,
[mantleChainId]: mantle.id,
Expand Down
Loading