chore: Add autoSign unit test to validate no call unless using ledger/QR#26725
Merged
Conversation
Contributor
|
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. |
Contributor
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Since no production code is modified, there's no risk to user-facing functionality and no E2E tests are needed to validate these changes. The unit tests themselves will validate the test logic during the CI unit test phase. Performance Test Selection: |
asalsys
approved these changes
Mar 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Adds a unit test for
autoSignto validate that it does NOT get called unless using Ledger or QR account. This is an action item from the security team - https://docs.google.com/document/d/1yoaOLqVh0_WXxq3dGqi0dVFnMWaK05dhXYxFgvSOQvQ/edit?tab=t.0#heading=h.ngbwex5oz6hkChangelog
CHANGELOG entry:
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MCWP-372
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Test-only changes that add coverage around
autoSignearly-return behavior; no production logic is modified.Overview
Adds a new unit test ensuring
autoSigndoes nothing (no navigation and nogetDeviceIdcall) when the transactionfromaddress is not a Ledger/QR hardware account.Refactors the existing Jest mocks for
isHardwareAccountandgetDeviceIdto use reusable mock functions (mockIsHardwareAccount,mockGetDeviceId) so tests can override behavior and assert invocation.Written by Cursor Bugbot for commit 45715ce. This will update automatically on new commits. Configure here.