-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: cp-7.60.0 validate source amount in metamask pay #22758
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
app/components/Views/confirmations/hooks/transactions/useTransactionCustomAmountAlerts.ts
Show resolved
Hide resolved
app/components/Views/confirmations/hooks/alerts/useInsufficientPayTokenBalanceAlert.ts
Show resolved
Hide resolved
app/components/Views/confirmations/hooks/alerts/useInsufficientPayTokenBalanceAlert.ts
Show resolved
Hide resolved
app/components/Views/confirmations/hooks/alerts/useInsufficientPayTokenBalanceAlert.ts
Show resolved
Hide resolved
app/components/Views/confirmations/hooks/alerts/useInsufficientPayTokenBalanceAlert.ts
Show resolved
Hide resolved
app/components/Views/confirmations/hooks/alerts/useInsufficientPayTokenBalanceAlert.ts
Show resolved
Hide resolved
app/components/Views/confirmations/hooks/transactions/useTransactionCustomAmountAlerts.ts
Show resolved
Hide resolved
6393903 to
17e9218
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
app/components/Views/confirmations/hooks/transactions/useTransactionCustomAmountAlerts.ts
Show resolved
Hide resolved
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsAfter thorough investigation of the changed files, I've identified the following: Nature of Changes:
Impact Assessment:
Test Tags Rationale:
Why not other tags:
Risk Level: Medium
|
|



Description
Validate the raw source amount in MetaMask Pay after quotes are retrieved.
Also validate the source network fee using the max raw amount, rather than the estimated USD value.
Changelog
CHANGELOG entry: null
Related issues
Fixes: #6263 #22722
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Validates MetaMask Pay source amounts and max network fees using new totals fields, consolidates insufficient-fee alerts, updates fee displays/metrics, and bumps transaction-pay-controller to v7.
totals.fees.sourceNetwork.estimate.usdfor displayed network fees and validate fees with raw amounts (sourceAmount.raw+fees.sourceNetwork.max.*).AlertKeys.InsufficientPayTokenFees; fold native-fee checks intouseInsufficientPayTokenBalanceAlert; removeuseInsufficientPayTokenNativeAlert; update alert metrics mapping and alert filtering; rename prop topendingAmountUsd.BridgeFeeRowsums provider + source network estimate + target network; tooltip network fee uses estimate.mm_pay_network_fee_usdnow fromfees.sourceNetwork.estimate.usd; strategy/quote metrics unchanged.useTokenWithBalancenow exposesbalanceRaw.selectTransactionPayTokensByTransactionIdto[].insufficient_pay_token_balance_fees.messagecopy.@metamask/transaction-pay-controllerto^7.0.0.Written by Cursor Bugbot for commit 7a2c188. This will update automatically on new commits. Configure here.