chore(trading): add request correlation header to trade api calls#28253
Open
vytick wants to merge 1 commit into
Open
chore(trading): add request correlation header to trade api calls#28253vytick wants to merge 1 commit into
vytick wants to merge 1 commit into
Conversation
FreeWall
approved these changes
Jun 2, 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.
Add request correlation header
🤖 LLM Test Recommendations
Summary: The change is isolated to suite-common/trading/src/invityAPI.ts, which is the core Invity API client used for buy, sell, and swap trading operations. Despite static analysis mapping this file to 121 tests (indicating it's a broadly imported module), the actual risk is concentrated in the trading-related tests that directly exercise Invity API endpoints for quotes, trades, and transaction watching. The recommended strategy prioritizes all buy/sell/swap E2E tests at high priority since they directly exercise the API client's core methods, with form validation and fee-specific tests at medium priority. Non-trading tests (analytics, backup, onboarding, metadata, etc.) are omitted as they have no concrete dependency on the Invity API's behavior despite the transitive import.
Changed files (1)
suite-common/trading/src/invityAPI.tsRecommended tests (17)
🔴 High priority (10)
suite/e2e/tests/trading/buy-bitcoin.test.ts— This test directly exercises the Invity buy quotes and buy trade API endpoints, which are core to invityAPI.ts. It mocks invityEndpoint.buyQuotes and buyTrade, verifies trade request payloads, and tests the full buy flow including watch polling — all of which depend on the Invity API client.suite/e2e/tests/trading/buy-ethereum.test.ts— Tests the Ethereum buy flow using Invity API endpoints (buyQuotes, buyTrade). Changes to invityAPI.ts could affect how quotes are fetched, trade payloads are constructed, or responses are parsed for ETH assets.suite/e2e/tests/trading/buy-solana-token.test.ts— Tests buying a Solana SPL token (JUP) through the Invity API. It verifies buy quote display, trade request payload construction, and transaction detail success — all directly dependent on invityAPI.ts functionality.suite/e2e/tests/trading/sell-bitcoin.test.ts— Tests the full BTC sell flow using Invity sell API endpoints (sellQuotes, sellTrade, sellWatch). Verifies trade payload construction, quote display, and transaction status polling — all core invityAPI.ts operations.suite/e2e/tests/trading/sell-ethereum.test.ts— Exercises the Ethereum sell flow through Invity API endpoints. Verifies sell quotes, trade confirmation, and device prompt details — directly dependent on invityAPI.ts for API communication.suite/e2e/tests/trading/sell-solana.test.ts— Tests Solana sell flow with Invity API endpoints including sellQuotes, sellTrade, sellWatch, and swap watch polling with status transitions. Directly exercises invityAPI.ts trade and watch functionality.suite/e2e/tests/trading/swap-coins.test.ts— Tests SOL-to-BTC swap using Invity swap API endpoints (swapQuotes, swapWatch). Verifies full swap lifecycle including status transitions (SENDING→CONFIRMING→CONVERTING→SUCCESS), which depend on invityAPI.ts swap methods.suite/e2e/tests/trading/swap-coin-to-token.test.ts— Tests SOL-to-USDC swap flow using Invity swap quotes and trade endpoints. Verifies quote fetching, trade execution, and success status — all core invityAPI.ts swap operations.suite/e2e/tests/trading/swap-token-to-coin.test.ts— Tests swapping USDT token to BTC through Invity swap API. Verifies swap quote display, trade confirmation payload, and transaction success status directly through invityAPI.ts.suite/e2e/tests/trading/swap-tokens.test.ts— Tests USDT-to-USDC SPL token swap using Invity swap endpoints. Exercises quote fetching, trade execution, and success verification — all dependent on invityAPI.ts swap methods.🟡 Medium priority (7)
suite/e2e/tests/trading/buy-negative.test.ts— Tests negative/edge cases in the buy flow including API returning empty quotes, min/max limit validation. Changes to invityAPI.ts could affect how error responses and empty quote arrays are handled.suite/e2e/tests/trading/sell-ethereum-token.test.ts— Tests selling an ERC-20 token (USDC) through Invity sell API. While similar to other sell tests, it covers the token-specific path which may exercise different serialization logic in invityAPI.ts.suite/e2e/tests/trading/sell-inputs.test.ts— Tests sell form input validation and fee calculations. While primarily UI-focused, it does interact with the trading infrastructure that invityAPI.ts supports, particularly around amount formatting.suite/e2e/tests/trading/swap-fees-bitcoin.test.ts— Tests BTC-to-ETH swap with custom fee settings, using Invity swap quotes endpoint. Verifies that fee data flows correctly through the swap API interaction layer in invityAPI.ts.suite/e2e/tests/trading/swap-fees-ethereum.test.ts— Tests ETH-to-BTC swap with custom Ethereum gas fees through Invity swap API. Verifies fee parameters are correctly passed, which depends on invityAPI.ts swap quote handling.suite/e2e/tests/trading/swap-token-to-disabled-network.test.ts— Tests swap quotes for a disabled network target (XLM), verifying that invityAPI.ts correctly returns and displays provider info even when the buy asset network is not enabled.suite/e2e/tests/trading/navigation.test.ts— Tests navigation to buy/sell/swap forms from various entry points. While primarily UI navigation, it relies on the trading infrastructure initialized by invityAPI.ts to render forms correctly.Updated: 2026-06-01T22:09:23.767Z
🔍 Currents Test Results
🔍 Suite desktop test results: View in Currents
🔍 Suite web test results: View in Currents
🔍 Suite native android test results: View in Currents
🔒 Quarantined E2E Tests
Trezor Suite (web) — 9 test(s)
Updated: 2026-06-01T22:14:11.322Z • 9 test(s) total
Trezor Suite (desktop) — 3 test(s)
Updated: 2026-06-01T22:12:08.073Z • 3 test(s) total
🌐 Preview deployments
🌐 Suite Web preview: https://dev.suite.sldev.cz/suite-web/feat/trading-add-traces/web/