Skip to content

Commit 1936e96

Browse files
committed
pull main changes
2 parents de2c292 + 5b74d77 commit 1936e96

4 files changed

Lines changed: 13 additions & 8 deletions

File tree

packages/snap/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,18 @@ Snap uses a Rust library [WebZjs](https://github.com/ChainSafe/WebZjs) compiled
1414

1515
- Node.js
1616
- Yarn
17-
- MetaMask Browser Extension (Metamask Flask for development purposes) [Install MM Flask](https://docs.metamask.io/snaps/get-started/install-flask/)
17+
- MetaMask Browser Extension (MetaMask Flask for development purposes) [Install MM Flask](https://docs.metamask.io/snaps/get-started/install-flask/)
1818

1919
## 🔨 Development
2020

21+
For local development, you need to add `http://localhost:8080` to the `allowedOrigins` in `snap.manifest.json`. The `endowment:rpc` section should look like this:
22+
23+
```json
24+
"endowment:rpc": {
25+
"allowedOrigins": ["https://webzjs.chainsafe.dev", "http://localhost:8080"]
26+
}
27+
```
28+
2129
1. Install dependencies with `yarn install`
2230
2. Build the project with `yarn build`
2331
3. Host snap on localhost http://localhost:8080 `yarn serve`

packages/snap/snap.manifest.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/ChainSafe/WebZjs.git"
88
},
99
"source": {
10-
"shasum": "Olnj5ggrDoQY6XdFo2GdQir9hHZkXx4sYmbUuhzdNu8=",
10+
"shasum": "2cQaKNl4ouKN6+2be59JvbwHzwD0o6WGYIoui+3miYM=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",
@@ -21,10 +21,7 @@
2121
"snap_dialog": {},
2222
"endowment:webassembly": {},
2323
"endowment:rpc": {
24-
"allowedOrigins": [
25-
"http://localhost:3000",
26-
"https://webzjs.chainsafe.dev"
27-
]
24+
"allowedOrigins": ["https://webzjs.chainsafe.dev"]
2825
},
2926
"snap_getBip44Entropy": [
3027
{

packages/snap/src/rpc/getViewingKey.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export async function getViewingKey(
2626
<Box>
2727
<Heading>Reveal Viewing Key to the {origin}</Heading>
2828
<Divider />
29-
<Text>{origin} needs access to the Viewing Key, approve this dialog to grant give permition.</Text>
29+
<Text>{origin} needs access to the Viewing Key, approve this dialog to give permission.</Text>
3030
<Divider />
3131
<Copyable value={viewingKey} />
3232
</Box>

packages/snap/src/rpc/setBirthdayBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export async function setBirthdayBlock({
2626
<Box>
2727
<Heading>Optional syncing block height</Heading>
2828
<Text>
29-
If you alerady created Zcash Web Wallet account with this Metamask
29+
If you already created Zcash Web Wallet account with this MetaMask
3030
seed you can enter optional birthday block of that Wallet.
3131
</Text>
3232
<Divider />

0 commit comments

Comments
 (0)