-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat: Display dynamic gas station fee #36961
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
base: main
Are you sure you want to change the base?
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. |
const metaMaskFee = add0x( | ||
new BigNumber(amount).times(METAMASK_FEE_PERCENTAGE).toString(16), | ||
); | ||
const metaMaskFee = gasFeeToken?.fee; |
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.
Bug: MetaMask Fee Display Fails for Native Tokens
The metaMaskFee
is undefined for native token transactions. This occurs because useNativeGasFeeToken()
doesn't provide a fee
property, which the new logic expects. This breaks the MetaMask fee display when falling back to native tokens, as a fee was always calculated previously.
✨ Files requiring CODEOWNER review ✨✅ @MetaMask/confirmations (1 files, +1 -4)
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [bf7f992]
UI Startup Metrics (1289 ± 73 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Description
The fee is being determined dynamically in the API already, so this is just displaying the correct value now, since 35% fee is capped at 10$.
Changelog
CHANGELOG entry:
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/6052
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Use
gasFeeToken.fee
for MetaMask fee instead of a hardcoded 35% calculation.gasFeeToken.fee
inui/pages/confirmations/components/confirm/info/hooks/useGasFeeToken.ts
.METAMASK_FEE_PERCENTAGE
and dependent BigNumber calculation; downstream fiat fee uses the provided fee value.Written by Cursor Bugbot for commit bf7f992. This will update automatically on new commits. Configure here.