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

Add image fetching utility functions #1995

Merged
merged 4 commits into from
Nov 30, 2023
Merged

Add image fetching utility functions #1995

merged 4 commits into from
Nov 30, 2023

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Nov 28, 2023

This adds two new functions which can be used for fetching images (PNG, JPG) in a Snap:

  • getImageData: Returns the raw image data string, which can be used as a href in an SVG image.
  • getImageComponent: Returns an image component which can be used in Snaps UI.

Closes MetaMask/MetaMask-planning#1573.

@Mrtenz Mrtenz force-pushed the mrtenz/image-utils branch from 5c32270 to 327fcd5 Compare November 29, 2023 12:43
@Mrtenz Mrtenz marked this pull request as ready for review November 29, 2023 12:47
@Mrtenz Mrtenz requested a review from a team as a code owner November 29, 2023 12:47
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1cd649d) 96.06% compared to head (5c0b518) 96.08%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1995      +/-   ##
==========================================
+ Coverage   96.06%   96.08%   +0.01%     
==========================================
  Files         266      267       +1     
  Lines        6202     6227      +25     
  Branches      999     1005       +6     
==========================================
+ Hits         5958     5983      +25     
  Misses        244      244              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Mrtenz
Copy link
Member Author

Mrtenz commented Nov 30, 2023

@metamaskbot update-pr

@Mrtenz Mrtenz force-pushed the mrtenz/image-utils branch from 35c2c5b to 5c0b518 Compare November 30, 2023 15:12
@Mrtenz Mrtenz merged commit 4bbc881 into main Nov 30, 2023
138 checks passed
@Mrtenz Mrtenz deleted the mrtenz/image-utils branch November 30, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants