Skip to content

Commit

Permalink
replace image for snap tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
joaniefromtheblock committed Jun 21, 2024
1 parent 5bfa160 commit 1c7bcce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Binary file added snaps/assets/snaps-error-gas-estimation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions snaps/learn/tutorials/gas-estimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Open `packages/snap/src/index.ts`.
This is the main code file for your Snap.
To get a gas fee estimate, use the public API endpoint provided by
[Open Source Ethereum Explorer](https://beaconcha.in/).
If it not already present, add the following `getFees()` function to the beginning of the `/packages/snap/src/index.ts` file:
If it is not already present, add the following `getFees()` function to the beginning of the `/packages/snap/src/index.ts` file:

```typescript title="index.ts"
import type { OnRpcRequestHandler } from "@metamask/snaps-sdk";
Expand Down Expand Up @@ -240,7 +240,7 @@ You have integrated a public API into MetaMask and displayed real-time gas fee e
If you click the **Send message** button and receive an error message similar to the following, update `packages/site/src/pages/index.tsx`:

<p align="center">
<img src="https://github.com/MetaMask/metamask-docs/assets/5465932/a22481a0-30d5-4efd-8cc5-c42db70f7eb1" alt="An error happened" width="400px" style={{border: '1px solid #DCDCDC'}} />
<img src={require('../../assets/snaps-error-gas-estimation.png').default}" alt="Button error for gas estimation" width="400px" style={{border: '1px solid #DCDCDC'}} />
</p>
Replace `await invokeSnap({ method: 'hello' })` on line 114 of `packages/site/src/pages/index.tsx` with the following code:
Expand Down
2 changes: 1 addition & 1 deletion snaps/learn/tutorials/transaction-insights.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ if (typeof transaction.data === "string" && transaction.data !== "0x") {
}
```
### 6. Next steps
## Next steps
The initial project has generic names in multiple places.
You can update the fields in `snap.manifest.json` to match your custom Snap:
Expand Down

0 comments on commit 1c7bcce

Please sign in to comment.