feat(rewards): hardware wallet support#40202
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. |
a440d3a to
c69df6f
Compare
Contributor
Author
Code reviewFound 1 issue:
metamask-extension/app/scripts/controllers/rewards/rewards-controller.ts Lines 1062 to 1071 in 2feb193 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Contributor
Builds ready [2feb193]
⚡ Performance Benchmarks (1355 ± 98 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
…ontroller - Remove unused `useMemo` import from useOptIn - Fix import order: move `isHardwareAccount` before local imports - Delete extra blank lines (prettier) - Wrap long lines to satisfy prettier print width - Fix `no-param-reassign` in rewards-controller by using local variable Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add app/scripts/controllers/rewards/rewards-data-service.test.ts to the unit test console baseline to allow its expected console.error output (RewardsDataService: Failed to fetch geolocation) during CI runs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Builds ready [1bea1ec]
⚡ Performance Benchmarks (1391 ± 106 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Delete extra blank line before closing describe block to satisfy prettier/prettier formatting rule (Delete ⏎ at line 672:1). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Contributor
Builds ready [02a3cdc]
⚡ Performance Benchmarks (1394 ± 108 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
SteP-n-s
approved these changes
Feb 25, 2026
EugeniyBykov
approved these changes
Feb 25, 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
Support for hardware wallets in rewards feature for extension.
Changelog
CHANGELOG entry: support for hardware wallets in rewards feature for extension.
Screenshots
Note
High Risk
High: introduces new SIWE auth + challenge endpoints and changes rewards authentication/subscription selection logic, which can affect opt-in/linking and access to balances (especially across mixed hardware/software account groups).
Overview
Adds hardware-wallet support to Rewards by introducing a SIWE-based authentication path: the controller can now
generateChallenge, request SIWE-awaresignPersonalMessage, and call new data-service endpointssiweLogin/siweJoinfor opt-in and account linking.Refines subscription-id handling and caching so hardware accounts don’t persist/use a
subscriptionIdunless a usable session token exists, skips hardware accounts during silent auth attempts, and extends season discovery/metadata to includepreviousseasons (with a shorter metadata cache TTL).Updates the UI to handle the new “hardware wallet needs explicit sign-in” state (
error-existing-subscription-hardware-wallet-explicit-sign) by showing a sign-in / signing-in badge, adjusts onboarding to no longer block hardware wallets, and ensures the onboarding modal stays behind QR signing modals via z-index/outside-click tweaks. Locale strings for the removed hardware-wallet onboarding error are deleted and new sign-in strings are added.Written by Cursor Bugbot for commit 02a3cdc. This will update automatically on new commits. Configure here.