-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: Adding alternateGasFees capability to wallet getCapabilities #16628
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
Conversation
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for alternateGasFees in the wallet's getCapabilities functionality so that dapps can determine if MetaMask supports paying with alternative tokens on a chain.
- Introduces a new relay utility (transaction-relay.ts) to assess relay support for chains.
- Updates the EIP-5792 capabilities logic to merge atomic and alternateGasFees capabilities based on relay and smart transaction checks.
- Adds comprehensive tests to verify the behavior of relay support and alternateGasFees in both the relay and capabilities modules.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
app/core/RPCMethods/transaction-relay.ts | New relay support utility, including network fetch and URL building. |
app/core/RPCMethods/transaction-relay.test.ts | Tests to verify the relay support logic. |
app/core/RPCMethods/eip5792.ts | Updates to include alternateGasFees capability integrated into getCapabilities. |
app/core/RPCMethods/eip5792.test.ts | Test enhancements for alternateGasFees and atomic capability scenarios. |
Comments suppressed due to low confidence (1)
app/core/RPCMethods/eip5792.ts:345
- [nitpick] For consistency, consider renaming 'chainIdNormalised' to 'chainIdNormalized' in the reduce callback.
(acc, chainIdNormalised) => {
…mask-mobile into gasless_capability
…mask-mobile into gasless_capability
|
|
|
Description
Add capability for dapp to know if MM supports paying using other tokens also on a chain.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/5234
Manual testing steps
Screenshots/Recordings
Pre-merge author checklist
Pre-merge reviewer checklist