Skip to content

Commit

Permalink
fix buffer issue for playground's enclave
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammed-Mamoun98 committed Oct 28, 2024
1 parent dbf6da7 commit 0d6eef4
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 11 deletions.
9 changes: 5 additions & 4 deletions apps/idos-enclave/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,26 @@
"@types/dompurify": "3.0.5",
"@types/lodash-es": "^4.17.12",
"autoprefixer": "^10.4.16",
"ethers": "5.7.1",
"postcss": "^8.4.31",
"tailwindcss": "^3.4.1",
"typescript": "^5.2.2",
"vite": "^5.2.0",
"vite-plugin-html": "^3.2.0",
"vite-plugin-mkcert": "^1.16.0",
"ethers": "5.7.1"
"vite-plugin-mkcert": "^1.16.0"
},
"dependencies": {
"@headlessui/react": "^2.1.8",
"@idos-network/idos-store": "workspace:*",
"@lit-protocol/auth-helpers": "^6.4.10",
"@lit-protocol/constants": "^6.5.0",
"@lit-protocol/lit-node-client": "^6.4.10",
"@lit-protocol/types": "^6.5.0",
"@headlessui/react": "^2.1.8",
"@idos-network/idos-store": "workspace:*",
"@preact/signals": "^1.3.0",
"@react-oauth/google": "^0.12.1",
"@stablelib/base64": "^1.0.1",
"@stablelib/utf8": "^1.0.1",
"buffer": "^6.0.3",
"dompurify": "^3.0.6",
"lodash-es": "^4.17.21",
"preact": "^10.19.6",
Expand Down
2 changes: 2 additions & 0 deletions apps/idos-enclave/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { Buffer } from "buffer";
// @ts-expect-error Not typed yet
import { Enclave } from "./lib/enclave";
import "./styles.css";

globalThis.Buffer = Buffer;
const enclaveWindow = window.self;
const hasParentWindow = enclaveWindow !== window.top;

Expand Down
34 changes: 27 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0d6eef4

Please sign in to comment.