feat(hw): shared files for QR context and hardware wallet context merger#29084
Conversation
Add normalizeReplacementGasFeeParams gas utility, getDeviceIdForAddress helper, QR connection tips, widen setTargetWalletType type, and refactor LedgerTransactionModal to use normalizeReplacementGasFeeParams.
|
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag Selection Rationale:
No other tags are needed as the changes are scoped to hardware wallet account management and transaction confirmation flows. Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |
| "tip_bluetooth_permission_v12": "Nearby devices permission is granted", | ||
| "tip_stay_close": "Your device stays close to your phone" | ||
| "tip_stay_close": "Your device stays close to your phone", | ||
| "qr_tip_scan": "Your camera is ready to scan the QR code", |
There was a problem hiding this comment.
Are these supposed to be in this PR?
There was a problem hiding this comment.
I think it's fine but this shows, alongside the other elements of this PR, that it was not properly split
| * Normalizes replacement gas params so only controller-supported fee fields | ||
| * are forwarded to replacement transaction flows. | ||
| */ | ||
| export function normalizeReplacementGasFeeParams( |
There was a problem hiding this comment.
This is duplicated in this PR: #29085. I see here it is used but not in the other one
There was a problem hiding this comment.
Will be used in subsequent prs
| * Some hardware wallets, like Ledger over BLE, require a persisted device id | ||
| * to reconnect. Others, like QR signers, do not. | ||
| */ | ||
| export async function getDeviceIdForAddress( |
There was a problem hiding this comment.
Will be used in subsequent prs



Description
Changelog
CHANGELOG entry: null
Related issues
Related to: https://consensyssoftware.atlassian.net/browse/MUL-1741
Manual testing steps
This can only be tested via #29087
Screenshots/Recordings
Not applicable
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Medium risk because it changes the gas fee parameters forwarded into cancel/speed-up transaction flows and adjusts hardware wallet context typing, which could affect transaction replacement behavior and hardware wallet connection UX.
Overview
Improves hardware-wallet and replacement-transaction handling by normalizing replacement gas fee params before calling
speedUpTransaction/stopTransaction, ensuring only complete controller-supported fee fields are forwarded (otherwiseundefined). Tests were added to cover legacy vs EIP-1559 normalization and the incomplete-fee edge case inLedgerTransactionModal.Extends hardware wallet utilities by adding
getDeviceIdForAddress(Ledger-only) and updating connection tips to include QR-specific guidance with new i18n strings. The hardware wallet context API is also loosened to allowsetTargetWalletType(null).Reviewed by Cursor Bugbot for commit da33c39. Bugbot is set up for automated code reviews on this repo. Configure here.