From a31595ad6fcd4e351ea28cb0658c5915e955f51b Mon Sep 17 00:00:00 2001 From: Lim Jet <57783762+daoauth@users.noreply.github.com> Date: Sun, 29 Dec 2024 18:07:34 +0900 Subject: [PATCH] bug fix --- src/webview/activitybar/package-lock.json | 65 +++++++++++++++++++++++ src/webview/activitybar/package.json | 1 + src/webview/activitybar/src/App.tsx | 3 ++ 3 files changed, 69 insertions(+) diff --git a/src/webview/activitybar/package-lock.json b/src/webview/activitybar/package-lock.json index 124035f..cf96b1f 100644 --- a/src/webview/activitybar/package-lock.json +++ b/src/webview/activitybar/package-lock.json @@ -11,6 +11,7 @@ "@aptos-labs/ts-sdk": "^1.33.1", "@vscode/webview-ui-toolkit": "^1.4.0", "bignumber.js": "^9.1.2", + "buffer": "^6.0.3", "crypto-js": "^4.2.0", "jose": "^5.9.6", "querystring": "^0.2.1", @@ -1811,6 +1812,26 @@ "dev": true, "license": "MIT" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/bignumber.js": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", @@ -1844,6 +1865,30 @@ "node": ">=8" } }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "node_modules/cacheable-lookup": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", @@ -2590,6 +2635,26 @@ "node": ">=10.19.0" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", diff --git a/src/webview/activitybar/package.json b/src/webview/activitybar/package.json index 2315b72..12d442f 100644 --- a/src/webview/activitybar/package.json +++ b/src/webview/activitybar/package.json @@ -13,6 +13,7 @@ "@aptos-labs/ts-sdk": "^1.33.1", "@vscode/webview-ui-toolkit": "^1.4.0", "bignumber.js": "^9.1.2", + "buffer": "^6.0.3", "crypto-js": "^4.2.0", "jose": "^5.9.6", "querystring": "^0.2.1", diff --git a/src/webview/activitybar/src/App.tsx b/src/webview/activitybar/src/App.tsx index 7d44d77..bf64ef6 100644 --- a/src/webview/activitybar/src/App.tsx +++ b/src/webview/activitybar/src/App.tsx @@ -1,6 +1,7 @@ import { useEffect, useRef, useState } from 'react'; import { useRecoilState } from 'recoil'; import { Aptos, AptosConfig } from '@aptos-labs/ts-sdk'; +import { Buffer } from 'buffer'; import './App.css'; @@ -12,6 +13,8 @@ import { Workspace } from './components/Workspace'; import { COMMENDS } from './utilities/commends'; import { STATE } from './recoil'; +window.Buffer = Buffer; + function App() { const initialized = useRef(false); const [hasTerminal, setHasTerminal] = useState(false);