chore(connect-popup): remove unused selectWalletConnectAppPermissions selector - #27838
Conversation
… selector (cherry picked from commit b7d21287f0bb7b40b4d0aa22437a136727b978ca)
| !!origin && | ||
| state.connectPopup.permissions.some(p => p.origin === origin && p.silentMode === true); | ||
|
|
||
| export const selectWalletConnectAppPermissions = (state: ConnectPopupStateRootState) => |
There was a problem hiding this comment.
@copilot why is this unused? do you see any opportunity to use this code? is there a duplicit inline implementation maybe?
There was a problem hiding this comment.
It’s unused because there are currently zero call sites for selectWalletConnectAppPermissions in the monorepo (rg selectWalletConnectAppPermissions returns none). I also checked for inline duplicates of the same filter (permissions.filter(... type === CALL_SOURCE_WALLETCONNECT)) and found none.
Current WalletConnect handling in this module checks source.type on the active call (e.g. in thunk/modal code), not a selector over remembered permissions, so there isn’t an obvious place to reuse this selector right now. This is why I removed it in 8eed517.
Summary
Removes the unused
selectWalletConnectAppPermissionsselector from@suite-common/connect-popup. Confirmed no callers across the monorepo.Split out from the staging dead-code PR #27551 (suite-common/* batch).
Related PRs
Sibling PRs in this batch (each removes one piece of dead code from
suite-common/*):Parent staging PR: #27551
Test plan
🤖 LLM Test Recommendations
Summary: The change is isolated to connectPopupReducer.ts, which manages TrezorConnect popup state (permissions, silent mode, popup lifecycle). This file maps to 121 tests via transitive imports, but the vast majority are unrelated to connect popup functionality — they simply import it as part of the broader Redux store. The highest risk is in TrezorConnect popup/permissions tests that directly exercise popup state transitions. The recommended strategy focuses on the 4 high-priority tests that directly validate popup permissions, lifecycle, and silent mode, plus 6 medium-priority tests covering other TrezorConnect API flows that go through the permissions modal.
Changed files (1)
suite-common/connect-popup/src/connectPopupReducer.tsRecommended tests (10)
🔴 High priority (4)
suite/e2e/tests/trezor-connect/connectPopupWeb.test.ts— The connectPopupReducer is the core state management for the TrezorConnect popup flow. This test directly exercises the popup lifecycle (open, close, permissions, cancellation) which is the primary functionality managed by connectPopupReducer.suite/e2e/tests/trezor-connect/connectPopupWebextension.test.ts— This test exercises the same TrezorConnect popup permission and lifecycle flows as the web variant but through a webextension context. Changes to connectPopupReducer directly affect popup state transitions tested here (permissions modal, cancellation, recovery after force-close).suite/e2e/tests/trezor-connect/permissions.test.ts— This test directly validates granting, remembering, and forgetting TrezorConnect app permissions — state that is explicitly managed by connectPopupReducer (connectPopup.permissions). Changes to the reducer could break permission persistence and revocation flows.suite/e2e/tests/trezor-connect/silentMode.test.ts— This test explicitly asserts on Redux state at connectPopup.permissions[0].silentMode, directly validating state managed by connectPopupReducer. It also tests the permissions modal remember/silent-mode checkbox interactions that the reducer handles.🟡 Medium priority (6)
suite/e2e/tests/trezor-connect/getAddress.test.ts— This test exercises the connect permissions modal and address confirmation flow that goes through the connect popup state. The loading header text and permission granting are managed by popup state from connectPopupReducer.suite/e2e/tests/trezor-connect/getAccountInfo.test.ts— This test exercises the connect permissions modal (confirmButton text, permission granting) which relies on state managed by connectPopupReducer. A regression in popup state could break the account selection flow.suite/e2e/tests/trezor-connect/ethereumSignMessage.test.ts— This test uses connectPermissionsModal to confirm permissions before signing, which depends on connect popup state management. Changes to the reducer could affect the permission confirmation flow.suite/e2e/tests/trezor-connect/ethereumSignTransaction.test.ts— This test confirms connect permissions via the modal and then proceeds through device confirmation steps. The permissions modal state is driven by connectPopupReducer.suite/e2e/tests/trezor-connect/signTransaction.test.ts— This test confirms connect permissions and proceeds through device confirmation prompts. The permission confirmation flow depends on connectPopupReducer state management.suite/e2e/tests/trezor-connect/error.test.ts— This test validates error display in the connect popup (@connect-popup-error/message) when an invalid path is provided. The error state rendering may depend on connectPopupReducer state.Updated: 2026-05-17T06:44:07.561Z
🔍 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) — 4 test(s)
Updated: 2026-05-17T06:48:36.788Z • 4 test(s) total
Trezor Suite (desktop) — 2 test(s)
Updated: 2026-05-17T06:47:30.011Z • 2 test(s) total
🌐 Preview deployments
🌐 Suite Web preview: https://dev.suite.sldev.cz/suite-web/mroz22/dead-code-connect-popup/web/