feat: adding context to send pages#17453
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.
Bug: Transaction Preparation Fails with Undefined Address
The from?.address as string type assertion can mask a potential undefined value for transactionParams.from if selectSelectedInternalAccount returns undefined, which could lead to runtime errors during transaction preparation or processing. Additionally, a commented-out hardcoded Ethereum address (// to: '0x089595380921f555d52AB6f5a49defdAaB23B444',) was accidentally committed, likely as debugging/test code, and should be removed.
app/components/Views/confirmations/context/send-context/send-context.tsx#L76-L82
Bug: Test Fails: Missing Context Provider
The new tests for Amount and To components render them directly without wrapping them in SendContextProvider. Both components use the useSendContext() hook, which requires this provider, causing the tests to fail at runtime due to the missing context.
app/components/Views/confirmations/components/send/to/to.test.tsx#L7-L11
app/components/Views/confirmations/components/send/amount/amount.test.tsx#L7-L11
Was this report helpful? Give feedback by reacting with 👍 or 👎
|
|



Description
The PR add:
Changelog
CHANGELOG entry:
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/5411
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/5426
Manual testing steps
Screenshots/Recordings
Screen.Recording.2025-07-23.at.11.05.17.AM.mov
Pre-merge author checklist
Pre-merge reviewer checklist