-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
chore: Bump Snaps packages #28215
chore: Bump Snaps packages #28215
Conversation
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring: Next stepsTake a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with |
@SocketSecurity ignore npm/@metamask/snaps-sdk@6.10.0 This is ours. |
af17e13
to
f524c1e
Compare
Builds ready [94895b1]
Page Load Metrics (1904 ± 71 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
## **Description** Add changes to Snaps Address UI component to support more flexible use cases. This PR needs release of the `snaps-sdk` after merging: MetaMask/snaps#2833 [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27798?quickstart=1) ## **Related issues** Fixes: MetaMask/snaps#2758 ## **Manual testing steps** 1. Use custom Snap build from template-snap-monorepo and add few varieties of address component to test new capabilities. 2. Make sure UI is looking good. 3. Make sure that there are no regressions. ## **Screenshots/Recordings** ### **Before** ![Screenshot 2024-10-11 at 18 12 06](https://github.com/user-attachments/assets/4d498bd6-0ef0-445c-90ab-40918e63b421) ### **After** ![Screenshot 2024-10-15 at 14 34 16](https://github.com/user-attachments/assets/792244b6-300d-45e2-b7e1-91bbcb93a9a6) ![Screenshot 2024-10-15 at 14 34 28](https://github.com/user-attachments/assets/9c6776e1-f6b6-4888-864b-b95621e83069) ![Screenshot 2024-10-15 at 14 34 47](https://github.com/user-attachments/assets/054a9127-ce9a-43d9-ab06-61c4099990a6) ![Screenshot 2024-10-15 at 14 35 10](https://github.com/user-attachments/assets/4c829486-2195-4f14-947e-cbc3572eb822) ### Snap code used for testing #### (_Might be useful for QA_) ```typescript export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => { switch (request.method) { case 'hello': return snap.request({ method: 'snap_dialog', params: { type: 'confirmation', content: ( <Box> <Heading size="lg">Some unknown address</Heading> <Text>Default address</Text> <Address address="0x1acC6721CF7642Eb37651F8019AC9a785C064002" /> <Text>Custom address (displayName=true)</Text> <Address address="0x1acC6721CF7642Eb37651F8019AC9a785C064002" displayName={true} /> <Text>Custom address (avatar=false)</Text> <Address address="0x1234567890123456789012345678901234567890" avatar={false} /> <Text>Custom address (displayName=true, avatar=false)</Text> <Address address="0x1234567890123456789012345678901234567890" displayName={true} avatar={false} /> <Text>Custom address (truncate=false)</Text> <Address address="0x1234567890123456789012345678901234567890" truncate={false} /> <Text>Custom address (truncate=false, avatar=false)</Text> <Address address="0x1234567890123456789012345678901234567890" truncate={false} avatar={false} /> <Heading size="lg">My address</Heading> <Text>Default address</Text> <Address address="0xBc641D258aA0e90F70AaDbcC4dE2D58d88029713" /> <Text>Custom address (displayName=true)</Text> <Address address="0xBc641D258aA0e90F70AaDbcC4dE2D58d88029713" displayName={true} /> <Text>Custom address (avatar=false)</Text> <Address address="0xBc641D258aA0e90F70AaDbcC4dE2D58d88029713" avatar={false} /> <Text>Custom address (displayName=true, avatar=false)</Text> <Address address="0xBc641D258aA0e90F70AaDbcC4dE2D58d88029713" displayName={true} avatar={false} /> <Text>Custom address (truncate=false)</Text> <Address address="0xBc641D258aA0e90F70AaDbcC4dE2D58d88029713" truncate={false} /> <Text>Custom address (truncate=false, avatar=false)</Text> <Address address="0xBc641D258aA0e90F70AaDbcC4dE2D58d88029713" truncate={false} avatar={false} /> <Heading size="lg">Contact address</Heading> <Text>Default address</Text> <Address address="0x1acC6721CF7642Eb37651F8019AC9a785C064002" /> <Text>Custom address (displayName=true)</Text> <Address address="0x1acC6721CF7642Eb37651F8019AC9a785C064002" displayName={true} /> <Text>Custom address (avatar=false)</Text> <Address address="0x1acC6721CF7642Eb37651F8019AC9a785C064002" avatar={false} /> <Text>Custom address (displayName=true, avatar=false)</Text> <Address address="0x1acC6721CF7642Eb37651F8019AC9a785C064002" displayName={true} avatar={false} /> <Text>Custom address (truncate=false)</Text> <Address address="0x1acC6721CF7642Eb37651F8019AC9a785C064002" truncate={false} /> <Text>Custom address (truncate=false, avatar=false)</Text> <Address address="0x1acC6721CF7642Eb37651F8019AC9a785C064002" truncate={false} avatar={false} /> </Box> ), }, }); default: throw new Error('Method not found.'); } }; ``` ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: Guillaume Roux <hello@guillaumerx.fr>
df64b2b
to
093caf7
Compare
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. |
Builds ready [093caf7]
Page Load Metrics (1843 ± 57 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
? toChecksumHexAddress(parsed.address) | ||
: parsed.address, | ||
); | ||
// For EVM addresses, we make sure they are checksummed. |
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.
Hmm how come we aren't checksumming for non-evm (at least the one that we know about -- bitcoin)?
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.
We are assuming that Snaps take care of this part and won't build in special checksum logic for additional chains
Builds ready [da7906a]
Page Load Metrics (1846 ± 64 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Bump Snaps packages and handle any required changes.
Summary of Snaps changes:
truncate
,displayName
andavatar
props toAddress
componentplatformVersion
in the manifest and reject invalid versions when specified in stable