Skip to content

Commit

Permalink
Fix types and example snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
FrederikBolding committed Oct 16, 2023
1 parent c48177d commit f1f1d32
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/examples/packages/bip32/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "0MNF0tdM0XhgOK7bsA8JrDijeAQsb27l0AO6W0SG/gg=",
"shasum": "EdwnuHKiqsIz4f+l6nKY0wZaq8bni4a5YEs4p6375/c=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/bip44/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "mhiMYbYYXElNE36MQdgYI1hMsDAHENuOpCSvHLUrZmc=",
"shasum": "MVUJZIRIG1QLd6ZhFftNn5pFGTzvnd2D39K9UABBfhU=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/dialogs/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "FHU65YO8VkgoYoipofh4L8KO7t65j6Ff2XX4NcpCNzM=",
"shasum": "co2jtMEwsAvgoeQJjq51RbqWbFramRLf/eVToZvetEo=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/get-entropy/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "fpU8kfh2ldR4f2JLrS3fDFAq0EcpNntfagR7/1sm3PI=",
"shasum": "7t1AQR2GJYVsKreUSkmEDUx2xHZNHkyHZ6IKexPyhWA=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/get-file/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "vHm3dYe/dASo+g4bVCv6zusOtu21K3C3Cocdh4V10/o=",
"shasum": "bnQfXShMxpKS2CIvqeRUuU4Par5ZwlmB+miXZ95jNLY=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/get-file/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => {
case 'getFile': {
const fileInHexadecimal = await snap.request({
method: 'snap_getFile',
params: { path: './src/foo.json' },
params: { path: './src/foo.json', encoding: 'hex' },
});
const bytes = hexToBytes(fileInHexadecimal);
return JSON.parse(bytesToString(bytes));
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/get-locale/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "+sFQRQvyN15I75BG+Xmh1arqcBB4u+d+kloY4NNyT4o=",
"shasum": "jKYiuKBqNaeeWsUi/TQp6OBh6UveiWiBb3NrL78L4V8=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "QSfR0IK/aod5Y8y7oJRZfA3iyX/VYnjY8Gy5tw8Hmy0=",
"shasum": "dDhGT/5cpuAv+fsSIinTSg0vo+r1l4Xb4WfypWEjyyM=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/manage-state/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "5AhJf+D5cchFzTQjuBChEwM/XL5ekkVqgEqF5epFM3s=",
"shasum": "TO6zLIG+k6OIa6iJ951A0R4kmQ28kT4A67Jaa87ElLY=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "WMW0HotuQnSikUIvxcsAaqq+nvOm6utIX+EKIdxUN+A=",
"shasum": "1Hf1QF/WH3S6kjX7B0VDO0D8sj8WqcfvsK7NoeNrrFc=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/rpc-methods/src/permitted/getFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const hookNames: MethodHooksObject<GetFileHooks> = {

export const getFileHandler: PermittedHandlerExport<
GetFileHooks,
JsonRpcRequest<unknown>,
GetFileArgs,
string
> = {
methodNames: ['snap_getFile'],
Expand Down Expand Up @@ -58,7 +58,7 @@ export type GetFileHooks = {
* @returns Nothing.
*/
async function implementation(
req: JsonRpcRequest<unknown>,
req: JsonRpcRequest<GetFileArgs>,
res: PendingJsonRpcResponse<unknown>,
_next: unknown,
end: JsonRpcEngineEndCallback,
Expand Down

0 comments on commit f1f1d32

Please sign in to comment.