-
Notifications
You must be signed in to change notification settings - Fork 563
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 name lookup example snap #1768
Conversation
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.
Make sure to add the example to the README.md
in packages/examples
too!
packages/test-snaps/src/features/snaps/name-lookup/NameLookup.tsx
Outdated
Show resolved
Hide resolved
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #1768 +/- ##
==========================================
+ Coverage 95.79% 95.82% +0.02%
==========================================
Files 240 239 -1
Lines 5476 5464 -12
Branches 852 851 -1
==========================================
- Hits 5246 5236 -10
+ Misses 230 228 -2
☔ View full report in Codecov by Sentry. |
Update example readme. Fix changelog. Add Jest config. Fix package scripts. Use updated config file. Add JSDoc.
Co-authored-by: Maarten Zuidhoorn <[email protected]>
No top level dependency changes detected. Learn more about Socket for GitHub ↗︎ |
👍 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. |
@SocketSecurity ignore @esbuild-plugins/[email protected] |
The current example snap is not inline with SIP-12, see #1768 (comment)
Add the
Name Lookup Example Snap
to support manual and E2E testing with thename-lookup
handler and endowment.Supports resolving both domains and addresses based on the request.
If an address is provided, it returns static text followed by a shortened form of the address and the hex form of the chain ID, in order to provide some validation of the received arguments. e.g.
example.domain - 0xCD2 / 0x5
If a domain is provided, it simply returns a static Ethereum address:
0xc0ffee254729296a45a3885639AC7E10F9d54979
If neither values are provided, it returns
null
.No additional UI is included in the
test-snaps
package beyond the standardConnect
button.