-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(perps): integrate MetaMask Points rewards and fee discounts for Perps trading #19808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+5,809
−458
Conversation
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
- Resolve merge conflicts in PerpsOrderView, perpsConfig, HyperLiquidProvider - Migrate from direct API calls to RewardsController pattern - Add CAIP-10 account formatting for Arbitrum perps - Integrate fee discount display based on MetaMask Points tier - Add points estimation for perps trading activities - Remove direct REWARDS_API_CONFIG usage - Keep main's cleaner logging and formatPerpsFiat utilities - Maintain non-blocking rewards features with graceful fallbacks
- Remove broken REWARDS_API_CONFIG imports - Migrate fetchFeeDiscount to use RewardsController:getPerpsDiscountForAccount - Migrate estimatePoints to use RewardsController:estimatePoints - Add proper CAIP-10 account formatting for Arbitrum (eip155:42161) - Simplify EstimatePointsDto structure to match controller interface - Maintain caching behavior and error handling - Enable points estimation display for manual validation This fixes the broken points estimation that was preventing users from seeing estimated points before placing perps orders as per TASK_CALLDL_REWARDS.md
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. |
- Add comprehensive edge case tests to FoxIcon.test.tsx - Fix ESLint errors: replace 'any' types with proper typing - Fix non-null assertion with optional chaining - Add missing Engine mock for rewards controller - Fix import/export style in usePerpsRewards.test.ts - Add newline at end of test files for eslint compliance - Complete test coverage improvements following unit testing guidelines
jbblanc
approved these changes
Sep 18, 2025
|
nickewansmith
approved these changes
Sep 18, 2025
bfullam
approved these changes
Sep 18, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
No QA Needed
Apply this label when your PR does not need any QA effort.
release-7.57.0
Issue or pull request that will be included in release 7.57.0
size-XL
team-perps
Perps team
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
This PR implements MetaMask Points rewards integration for Perps trading, including tier-based fee discounts and points estimation display. Users now see their estimated points earnings and receive fee discounts based on their MetaMask Points tier before executing trades.
What is the reason for the change?
What is the improvement/solution?
Changelog
CHANGELOG entry: Added MetaMask Points rewards integration to Perps trading with tier-based fee discounts and points estimation display
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-09-16.at.20.55.00.mp4
Pre-merge author checklist
Pre-merge reviewer checklist