-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update Snaps tutorials to match latest tooling #1206
Conversation
Preview published: update-snaps-tutorial |
Preview published: update-snaps-tutorial |
Preview published: update-snaps-tutorial |
Preview published: update-snaps-tutorial |
Preview published: update-snaps-tutorial |
Preview published: update-snaps-tutorial |
Hi @Montoya. Running through these steps, I get the following error when
|
Preview published: update-snaps-tutorial |
Preview published: update-snaps-tutorial |
On which tutorial? Are you sure the Snap installed correctly? |
Preview published: update-snaps-tutorial |
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.
LGTM
Preview published: update-snaps-tutorial |
Preview published: update-snaps-tutorial |
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.
@joaniefromtheblock Minor comments to retroactively address.
name of the method for showing gas fee estimates. | ||
If you change the method name, make sure to change the method name in `/packages/snap/src/index.ts` | ||
to match. | ||
If you change the method name in `/packages/site/src/pages/index.tsx`, ensure you change the method name in `/packages/snap/src/index.ts` to match. | ||
|
||
After you have made all necessary changes, you can | ||
[publish your Snap to npm](../../how-to/publish-a-snap.md#publish-your-snap). |
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.
Update link to ../../how-to/publish-a-snap.md
.
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.
Thanks @alexandratran will address in new PR
If you have previously developed a decentralized app (dApp), you're likely familiar with | ||
accessing the Ethereum provider using `window.ethereum`. In a Snap, the `window` object is not available. | ||
Instead when you request the `endowment:ethereum-provider` permission, your Snap is granted access to the `ethereum` global object. |
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.
Update to:
If you have previously developed a dapp, you're likely familiar with accessing the Ethereum provider using `window.ethereum`.
In a Snap, the `window` object is not available.
Instead, when you request the `endowment:ethereum-provider` permission, your Snap is granted access to the [`ethereum` global object](../about-snaps/apis.md#snap-requests).
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.
Thanks @alexandratran will address in new PR
The Snaps tutorials were out of date with the latest dependencies, tooling, and visual style of Snaps. This updates everything to latest requirements.