Skip to content

Conversation

@Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Feb 26, 2025

This adds support for the SIP-30 source parameter to all examples and test-snaps.

@codecov
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.93%. Comparing base (67adcef) to head (46204ee).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3165   +/-   ##
=======================================
  Coverage   94.93%   94.93%           
=======================================
  Files         507      507           
  Lines       11172    11184   +12     
  Branches     1721     1722    +1     
=======================================
+ Hits        10606    10618   +12     
  Misses        566      566           

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

Base automatically changed from mrtenz/sip-30 to main February 26, 2025 22:48
@Mrtenz Mrtenz force-pushed the mrtenz/sip-30-examples branch from 7083782 to 3e9fdac Compare February 27, 2025 10:40
@Mrtenz Mrtenz marked this pull request as ready for review February 27, 2025 10:40
@Mrtenz Mrtenz requested a review from a team as a code owner February 27, 2025 10:40
@Mrtenz Mrtenz changed the title Add SIP-30 source to all examples and test-snaps Refactor SIP-30 implementation and update examples Feb 27, 2025
export const GetEntropy: FunctionComponent = () => {
const [source, setSource] = useState<string | undefined>(undefined);
const { selector, source } = useEntropySelector({
raw: true,
Copy link
Member

Choose a reason for hiding this comment

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

What's the use-case for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

When enabled it shows the raw values returned by snap_listEntropySources. I figured it might be useful for E2E.

raw = false,
}: UseEntropySelectorOptions) => {
const [source, setSource] = useState<string | undefined>(undefined);
const snapId = getSnapId(publicSnapId, port);
Copy link
Member

Choose a reason for hiding this comment

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

Not sure I fully follow the "translation" of the ID here?

Copy link
Member Author

Choose a reason for hiding this comment

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

getSnapId is the helper function we use everywhere, which returns the NPM Snap ID (publicSnapId in this case) if running on the hosted version, or the local Snap ID if running locally.

@Mrtenz Mrtenz added this pull request to the merge queue Feb 27, 2025
Merged via the queue into main with commit 911d29a Feb 27, 2025
123 checks passed
@Mrtenz Mrtenz deleted the mrtenz/sip-30-examples branch February 27, 2025 14:07
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