Skip to content
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 #27376

Merged
merged 16 commits into from
Oct 16, 2024
Merged

chore: Bump Snaps packages #27376

merged 16 commits into from
Oct 16, 2024

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Sep 24, 2024

Description

This bumps all Snaps packages to the latest versions.

Summary of changes in the snaps deps:

  • Allow updating context in snap_updateInterface
  • Add snap_getCurrencyRate RPC method
  • Add Avatar component
  • Add min, max and step props to Input component
  • Add size prop to Heading component
  • Add support for metamask: schemed URLs in Snap UI links
  • Pass full URLs to PhishingController
  • Ignore Snap insight response if transaction or signature has already been signed
  • Allow Link in Row and Address in Link

Closes MetaMask/snaps#2776

Open in GitHub Codespaces

Pre-merge author checklist

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.

@Mrtenz
Copy link
Member Author

Mrtenz commented Sep 24, 2024

@metamaskbot update-policies

@github-actions github-actions bot added the team-snaps-platform Snaps Platform team label Sep 24, 2024
@Mrtenz Mrtenz changed the title Bump Snaps packages chore: Bump Snaps packages Sep 24, 2024
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Sep 24, 2024
@metamaskbot
Copy link
Collaborator

Policy update failed. You can review the logs or retry the policy update here

Copy link
Contributor

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.

@metamaskbot
Copy link
Collaborator

Builds ready [4e994b4]
Page Load Metrics (1752 ± 67 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint38919851676328157
domContentLoaded14251922172113565
load14961973175213967
domInteractive147744199
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 348 Bytes (0.01%)
  • ui: 1.13 KiB (0.01%)
  • common: 11.14 KiB (0.15%)

builds.yml Outdated Show resolved Hide resolved
Copy link
Member

@FrederikBolding FrederikBolding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a changelog to the PR that lists the added features etc in this bump?

Makes it easier to track down when features got released.

@metamaskbot
Copy link
Collaborator

Builds ready [7c18e47]
Page Load Metrics (1814 ± 85 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint16322235180816880
domContentLoaded15672131176914770
load15762247181417685
domInteractive178546189
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 348 Bytes (0.01%)
  • ui: 1.13 KiB (0.01%)
  • common: 11.14 KiB (0.15%)

@Mrtenz Mrtenz force-pushed the mrtenz/bump-snaps-packages branch 3 times, most recently from 0434349 to 86d70c2 Compare October 15, 2024 09:09
GuillaumeRx
GuillaumeRx previously approved these changes Oct 15, 2024
@Mrtenz
Copy link
Member Author

Mrtenz commented Oct 15, 2024

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

No policy changes

@metamaskbot
Copy link
Collaborator

Builds ready [893d11b]
Page Load Metrics (1974 ± 110 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint30326821886424204
domContentLoaded160326171937218105
load160726781974229110
domInteractive188846199
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 378 Bytes (0.01%)
  • ui: 4.63 KiB (0.06%)
  • common: 10.78 KiB (0.14%)

Mrtenz and others added 8 commits October 15, 2024 14:32
## **Description**


Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change? Previously, developers couldn't
navigate to parts of the extension with the existing functionality
provided to them through snaps UI
2. What is the improvement/solution? The Snaps `Link` component now
checks for if the url is a MetaMask url and navigates to the proper path
accordingly.


## **Screenshots/Recordings**

### **After**


## **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.
GuillaumeRx and others added 7 commits October 15, 2024 14:32
## **Description

This PR adds support for the `size` prop to the `Heading` component.
Right now `md` is bind to `headingMd`, `lg` is bind to `headingLg` to
match
https://www.figma.com/design/2cqqTWJKoHcjYVGfNXxLbQ/Beyond-Ethereum?node-id=3458-5041&node-type=text&m=dev
as requested by @eriknson. The default behavior if `size` is not defined
si `headingSm`

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27721?quickstart=1)

## **Related issues**

## **Manual testing steps**

## **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.
## **Description**

This adds the `min`, `max` and `step` props to the `Input` component of
Snaps custom UI.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27822?quickstart=1)

## **Related issues**

## **Manual testing steps**

## **Screenshots/Recordings**


## **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.
## **Description**

This PR adds a case for the `sm` variant of the `size` prop in the
`Heading` Snaps custom UI component.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27823?quickstart=1)

## **Related issues**

## **Manual testing steps**

## **Screenshots/Recordings**

## **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: Hassan Malik <hbmalik88@gmail.com>
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Move Snaps UI avatar implementation to a separate component that can be
consumed by Snaps.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27826?quickstart=1)

## **Related issues**

Closes: MetaMask/snaps#2776

## **Manual testing steps**
```jsx
export const onRpcRequest: OnRpcRequestHandler = async ({
  origin,
  request,
}) => {
  switch (request.method) {
    case 'hello':
      return snap.request({
        method: 'snap_dialog',
        params: {
          type: 'confirmation',
          content: (
            <Box>
              <Text>
                Hello, <Bold>{origin}</Bold>!
              </Text>
              <Text>
                This custom confirmation is just for display purposes.
              </Text>
              <Text>
                But you can edit the snap source code to make it do something,
                if you want to!
              </Text>
              <Address address='eip155:1:0x1234567890123456789012345678901234567890' />
              <Avatar address="eip155:1:0x1234567890123456789012345678901234567890" />
              <Address address="bip122:000000000019d6689c085ae165831e93:128Lkh3S7CkDTBZ8W7BbpsN3YYizJMp8p6" />
              <Avatar address="bip122:000000000019d6689c085ae165831e93:128Lkh3S7CkDTBZ8W7BbpsN3YYizJMp8p6" />
              <Box direction="horizontal" alignment="space-between" center={true}>
                <Text>Avatar</Text>
                <Avatar address="bip122:000000000019d6689c085ae165831e93:128Lkh3S7CkDTBZ8W7BbpsN3YYizJMp8p6" />
              </Box>
 
            </Box>
          ),
        },
      });
    default:
      throw new Error('Method not found.');
  }
};

```

## **Screenshots/Recordings**

<img width="387" alt="Screenshot 2024-10-14 at 14 44 50"
src="https://github.com/user-attachments/assets/e06a0aca-0aeb-4004-9290-d700867b4eff">
## **Description**

This PR fixes a type issue on custom UI `Input` component.


[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27860?quickstart=1)

## **Related issues**

## **Manual testing steps**

## **Screenshots/Recordings**

## **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.
@Mrtenz Mrtenz marked this pull request as ready for review October 15, 2024 12:36
@Mrtenz Mrtenz requested review from a team as code owners October 15, 2024 12:36
GuillaumeRx
GuillaumeRx previously approved these changes Oct 15, 2024
ritave
ritave previously approved these changes Oct 15, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [7598b3a]
Page Load Metrics (1833 ± 92 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint157025661835215103
domContentLoaded15602407180018689
load15702451183319192
domInteractive177149168

@GuillaumeRx GuillaumeRx dismissed stale reviews from ritave and themself via a756f10 October 16, 2024 12:38
Copy link

sonarcloud bot commented Oct 16, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@bowensanders
Copy link
Contributor

LGTM ✅

@FrederikBolding FrederikBolding added this pull request to the merge queue Oct 16, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [a756f10]
Page Load Metrics (1753 ± 77 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14852307176216579
domContentLoaded14752265172615675
load14842308175316077
domInteractive1910838209

Merged via the queue into develop with commit d1d469e Oct 16, 2024
77 of 78 checks passed
@FrederikBolding FrederikBolding deleted the mrtenz/bump-snaps-packages branch October 16, 2024 19:35
@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2024
@metamaskbot metamaskbot added the release-12.7.0 Issue or pull request that will be included in release 12.7.0 label Oct 16, 2024
@gauthierpetetin gauthierpetetin added release-12.6.0 Issue or pull request that will be included in release 12.6.0 and removed release-12.7.0 Issue or pull request that will be included in release 12.7.0 labels Oct 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template release-12.6.0 Issue or pull request that will be included in release 12.6.0 team-snaps-platform Snaps Platform team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose a component that displays an Avatar (Jazzicon/Blockie)
8 participants