Repository navigation
feat(e2e): add Tron swap token registry and quote fixtures - #44159
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [543ec1e]
⚡ Performance Benchmarks (Total: 🟢 17 pass · 🟡 7 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
8deda1d to
41ab807
Compare
543ec1e to
1fc2415
Compare
Builds ready [1fc2415] [reused from 543ec1e]
⚡ Performance Benchmarks (Total: 🟢 17 pass · 🟡 7 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
41ab807 to
0af69d1
Compare
1fc2415 to
8e6c767
Compare
0af69d1 to
8d5f37a
Compare
8e6c767 to
674f862
Compare
Builds ready [674f862]
⚡ Performance Benchmarks (Total: 🟢 16 pass · 🟡 6 warn · 🔴 2 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
The parameterized quote mock omitted priceData, slippage, and Tron-specific trade fields required by the swap UI, causing E2E timeouts on PR #44159.
Builds ready [57d2441] [reused from 674f862]
⚡ Performance Benchmarks (Total: 🟢 16 pass · 🟡 6 warn · 🔴 2 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
8d5f37a to
87111a6
Compare
The parameterized quote mock omitted priceData, slippage, and Tron-specific trade fields required by the swap UI, causing E2E timeouts on PR #44159.
57d2441 to
273bb7e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7b0da27. Configure here.
The parameterized quote mock omitted priceData, slippage, and Tron-specific trade fields required by the swap UI, causing E2E timeouts on PR #44159.
7b0da27 to
e802141
Compare
|
Builds ready [e802141]
⚡ Performance Benchmarks (Total: 🟢 12 pass · 🟡 11 warn · 🔴 1 fail)
Bundle size diffs
|
Builds ready [bf20f2c] [reused from 1894816]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 3 warn · 🔴 4 fail)
Bundle size diffs
|
Co-authored-by: Cursor <cursoragent@cursor.com>
Builds ready [cd71987] [reused from 88bc659]
⚡ Performance Benchmarks (Total: 🟢 10 pass · 🟡 7 warn · 🔴 4 fail)
Bundle size diffs
|




Description
Adds the Tron swap token registry and full bridge quote fixtures to
common-tron.ts, includingTRON_SWAP_TOKEN_REGISTRY,TronQuoteFixture, andmockBridgeGetTronQuoteForfor parameterized TRX→USDT (and other) swap quotes with the complete payload the swap UI expects (fees, slippage, price data).Rebased onto
mainafter #44157 and #44485 merged, removing duplicate history that inflated the prior diff to ~2009 lines. This PR is now 657 changed lines (383 additions, 274 deletions) in a single file.Part of the local-blockchain E2E initiative (WPN-536). Together with the preceding merged Tron mock PRs, this supersedes #43723.
Changelog
CHANGELOG entry: null
Related issues
Part of the local-blockchain E2E initiative (WPN-536).
Together with #44157 and #44485 supersedes #43723.
Manual testing steps
yarn build:testyarn test:e2e:single test/e2e/tests/tron/check-balance.spec.ts --browser=chrome(expect 3/3 passing).Screenshots/Recordings
N/A — test infrastructure only, no user-facing UI change.
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Changes are confined to Tron E2E mock helpers in a single test file; no production wallet, bridge, or auth paths are modified.
Overview
Extends Tron E2E mocks so swap flows can drive bridge
getQuoteresponses from aTronQuoteFixture(src/destsymbols, amounts, optional metabridge fee) viamockBridgeGetTronQuoteFor, whilemockBridgeGetTronQuotekeeps the prior default TRX→USDT case by delegating to that helper.Quote payloads are built from
TRON_SWAP_TOKEN_REGISTRY(fees, slippage floor, Rango/SunSwap metadata). TRX→USDT trades now include a TriggerSmartContract shape with protobuf-encodedraw_data_hexand a SHA256txIDtied tocall_value; other pairs get a lightweight placeholder trade.mockTronSpotPricesandmockTronAssetsaccept an optionalTronNodetoken map, derive asset IDs from shared TRC10/TRC20 defaults, return spot prices filtered byassetIds, and supply non-null prices for GAS_FREE and SEED where they were previouslynull.Reviewed by Cursor Bugbot for commit cd71987. Bugbot is set up for automated code reviews on this repo. Configure here.