-
Notifications
You must be signed in to change notification settings - Fork 639
Refactor SIP-30 implementation and update examples #3165
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
7083782 to
3e9fdac
Compare
source to all examples and test-snaps| export const GetEntropy: FunctionComponent = () => { | ||
| const [source, setSource] = useState<string | undefined>(undefined); | ||
| const { selector, source } = useEntropySelector({ | ||
| raw: true, |
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.
What's the use-case for this?
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.
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); |
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.
Not sure I fully follow the "translation" of the ID here?
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.
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.
This adds support for the SIP-30 source parameter to all examples and
test-snaps.