-
Notifications
You must be signed in to change notification settings - Fork 5.4k
fix: Fix first time interaction alert to check real recipient and contract address #36763
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
✨ Files requiring CODEOWNER review ✨✅ @MetaMask/confirmations (2 files, +68 -50)
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [01064ff]
UI Startup Metrics (1224 ± 72 ms)
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [526afa2]
UI Startup Metrics (1294 ± 76 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
state: TrustSignalDisplayState.Verified, | ||
label: null, | ||
}, | ||
]); |
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: Mock Returns Single Signal, Fails Multi-Address Testing
The useTrustSignals
mock in tests consistently returns a single trust signal, even though the hook can request signals for multiple addresses (like contract and recipient in token transfers). This prevents accurate testing of multi-address scenarios and conditions that rely on checking all or some trust signals.
Additional Locations (1)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [a9b8a2b]
UI Startup Metrics (1213 ± 65 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
This PR aims to fix first time interaction alert to check recipient derived from transaction data when sending ERCX tokens. It still checks the
to
parameter regardless of the changes.Changelog
CHANGELOG entry: null
Related issues
Fixes: #35595
Manual testing steps
See task details to repro steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Update first-time interaction alert to check both the transaction
to
and derived recipient withuseTrustSignals
, refining loading/verified logic and tests.useFirstTimeInteractionAlert
to useuseTrustSignals
with multiple requests (fortxParams.to
and derived recipient fromuseTransferRecipient
).isFirstTimeInteraction
true, no first-party contract, no loading trust signals, and all addresses not verified.transactionTo
separately; compare internal accounts against the derived recipient; usegetExperience
ontxParams.to
.useTrustSignals
and return arrays; addto
in transaction mocks and set explicit types where needed.Written by Cursor Bugbot for commit a9b8a2b. This will update automatically on new commits. Configure here.