Skip to content

Commit

Permalink
[fe] Package updates (MystenLabs#7112)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan-Mysten authored Jan 5, 2023
1 parent f0b27c8 commit 1d0cc7e
Show file tree
Hide file tree
Showing 17 changed files with 2,259 additions and 2,595 deletions.
2 changes: 1 addition & 1 deletion apps/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"@headlessui/tailwindcss": "^0.1.2",
"@tailwindcss/aspect-ratio": "^0.4.2",
"tailwindcss": "^3.2.4",
"typescript": "^4.8.3"
"typescript": "^4.9.4"
}
}
61 changes: 30 additions & 31 deletions apps/explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,84 +24,83 @@
"preview-storybook": "pnpm dlx serve ./storybook-static"
},
"dependencies": {
"@floating-ui/react-dom-interactions": "^0.10.1",
"@floating-ui/react-dom-interactions": "^0.13.3",
"@fontsource/inter": "^4.5.14",
"@fontsource/red-hat-mono": "^4.5.11",
"@growthbook/growthbook": "^0.18.1",
"@growthbook/growthbook-react": "^0.9.1",
"@headlessui/react": "^1.7.5",
"@growthbook/growthbook": "^0.20.1",
"@growthbook/growthbook-react": "^0.10.1",
"@headlessui/react": "^1.7.7",
"@hookform/resolvers": "^2.9.10",
"@mysten/core": "workspace:*",
"@mysten/sui.js": "workspace:*",
"@mysten/wallet-kit": "workspace:*",
"@sentry/react": "^7.24.2",
"@sentry/tracing": "^7.24.2",
"@tanstack/react-query": "^4.19.1",
"@tanstack/react-query-devtools": "^4.19.1",
"@tanstack/react-table": "^8.7.0",
"@visx/geo": "^2.10.0",
"@visx/responsive": "^2.10.0",
"@visx/tooltip": "^2.10.0",
"bignumber.js": "^9.1.0",
"class-variance-authority": "^0.2.3",
"@sentry/react": "^7.29.0",
"@sentry/tracing": "^7.29.0",
"@tanstack/react-query": "^4.20.9",
"@tanstack/react-query-devtools": "^4.20.9",
"@tanstack/react-table": "^8.7.4",
"@visx/geo": "^2.17.0",
"@visx/responsive": "^2.17.0",
"@visx/tooltip": "^2.17.0",
"bignumber.js": "^9.1.1",
"class-variance-authority": "^0.4.0",
"clsx": "^1.2.1",
"framer-motion": "^7.6.19",
"framer-motion": "^8.1.9",
"plausible-tracker": "^0.3.8",
"prism-react-renderer": "^1.3.5",
"prism-themes": "^1.9.0",
"prismjs": "^1.28.0",
"prismjs": "^1.29.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^3.1.4",
"react-hook-form": "^7.40.0",
"react-hook-form": "^7.41.5",
"react-hot-toast": "^2.4.0",
"react-router-dom": "^6.5.0",
"topojson-client": "^3.1.0",
"web-vitals": "^3.1.0",
"zod": "^3.19.1"
"zod": "^3.20.2"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/core": "^7.20.12",
"@playwright/test": "^1.29.1",
"@storybook/addon-a11y": "7.0.0-beta.3",
"@storybook/addon-essentials": "7.0.0-beta.3",
"@storybook/addons": "7.0.0-beta.3",
"@storybook/react": "7.0.0-beta.3",
"@storybook/react-vite": "7.0.0-beta.3",
"@storybook/theming": "7.0.0-beta.3",
"@testing-library/dom": "^8.19.0",
"@testing-library/dom": "^8.19.1",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@types/node": "^18.11.13",
"@types/node": "^18.11.18",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"@types/react-dom": "^18.0.10",
"@types/topojson-client": "^3.1.1",
"@vitejs/plugin-react": "^3.0.0",
"@vitest/ui": "^0.25.7",
"@vitejs/plugin-react": "^3.0.1",
"@vitest/ui": "^0.26.3",
"autoprefixer": "^10.4.13",
"axios": "^0.27.2",
"eslint": "^8.22.0",
"eslint-config-prettier": "^8.3.0",
"eslint": "^8.31.0",
"eslint-config-prettier": "^8.6.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-header": "^3.1.1",
"onchange": "^7.1.0",
"playwright": "^1.29.1",
"postcss": "^8.4.19",
"prettier": "2.8.1",
"prettier-plugin-tailwindcss": "^0.2.1",
"start-server-and-test": "^1.14.0",
"start-server-and-test": "^1.15.2",
"storybook": "7.0.0-beta.3",
"stylelint": "^14.5.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-standard": "^25.0.0",
"stylelint-config-standard-scss": "^3.0.0",
"tailwindcss": "^3.2.4",
"tsconfig-paths": "^4.1.1",
"typescript": "^4.8.3",
"vite": "^4.0.0",
"typescript": "^4.9.4",
"vite": "^4.0.4",
"vite-plugin-svgr": "^2.4.0",
"vitest": "^0.25.7"
"vitest": "^0.26.3"
},
"browserslist": {
"production": [
Expand Down
12 changes: 8 additions & 4 deletions apps/explorer/tests/utils/localnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
LocalTxnDataSerializer,
type Keypair,
} from '@mysten/sui.js';
import axios from 'axios';

const addressToKeypair = new Map<string, Keypair>();

Expand Down Expand Up @@ -57,10 +56,15 @@ export async function faucet() {
const keypair = Ed25519Keypair.generate();
const address = keypair.getPublicKey().toSuiAddress();
addressToKeypair.set(address, keypair);
const res = await axios.post<{ error: any }>('http://127.0.0.1:9123/gas', {
FixedAmountRequest: { recipient: address },
const res = await fetch('http://127.0.0.1:9123/gas', {
method: 'POST',
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({ FixedAmountRequest: { recipient: address } }),
});
if (res.data.error) {
const data = await res.json();
if (!res.ok || data.error) {
throw new Error('Unable to invoke local faucet.');
}
return address;
Expand Down
72 changes: 36 additions & 36 deletions apps/wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"devDependencies": {
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.18.6",
"@sentry/react": "^7.24.2",
"@sentry/tracing": "^7.24.2",
"@sentry/react": "^7.29.0",
"@sentry/tracing": "^7.29.0",
"@sentry/webpack-plugin": "^1.20.0",
"@storybook/addon-a11y": "7.0.0-beta.3",
"@storybook/addon-essentials": "7.0.0-beta.3",
Expand All @@ -56,30 +56,30 @@
"@storybook/theming": "7.0.0-beta.3",
"@types/dotenv-webpack": "^7.0.3",
"@types/git-rev-sync": "^2.0.0",
"@types/node": "^18.11.13",
"@types/node": "^18.11.18",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"@types/semver": "^7.3.12",
"@types/react-dom": "^18.0.10",
"@types/semver": "^7.3.13",
"@types/throttle-debounce": "^5.0.0",
"@types/uuid": "^8.3.4",
"@types/webextension-polyfill": "^0.9.0",
"@types/webpack": "^5.28.0",
"@types/zxcvbn": "^4.4.1",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@typescript-eslint/parser": "^5.38.1",
"concurrently": "^7.3.0",
"@typescript-eslint/eslint-plugin": "^5.48.0",
"@typescript-eslint/parser": "^5.48.0",
"concurrently": "^7.6.0",
"copy-webpack-plugin": "^11.0.0",
"cross-env": "^7.0.3",
"css-loader": "^6.7.1",
"css-loader": "^6.7.3",
"dotenv-webpack": "^8.0.0",
"eslint": "^8.20.0",
"eslint-config-prettier": "^8.5.0",
"eslint": "^8.31.0",
"eslint-config-prettier": "^8.6.0",
"eslint-config-react-app": "^7.0.1",
"eslint-webpack-plugin": "^3.2.0",
"git-rev-sync": "^3.0.2",
"happy-dom": "^8.1.0",
"happy-dom": "^8.1.2",
"html-webpack-plugin": "^5.5.0",
"mini-css-extract-plugin": "^2.6.1",
"mini-css-extract-plugin": "^2.7.2",
"onchange": "^7.1.0",
"plausible-tracker": "^0.3.0",
"postcss": "^8.4.19",
Expand All @@ -94,50 +94,50 @@
"stylelint-config-standard-scss": "^5.0.0",
"stylelint-webpack-plugin": "^3.3.0",
"svgtofont": "^3.17.8",
"ts-loader": "^9.3.1",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.1.1",
"typescript": "^4.8.3",
"vite": "^4.0.0",
"vitest": "^0.25.7",
"web-ext": "^7.2.0",
"tsconfig-paths": "^4.1.2",
"typescript": "^4.9.4",
"vite": "^4.0.4",
"vitest": "^0.26.3",
"web-ext": "^7.4.0",
"webpack": "^5.73.0",
"webpack-cli": "^4.10.0",
"webpack-merge": "^5.8.0"
},
"dependencies": {
"@floating-ui/react-dom-interactions": "^0.10.1",
"@floating-ui/react-dom-interactions": "^0.13.3",
"@fontsource/inter": "^4.5.14",
"@fontsource/red-hat-mono": "^4.5.11",
"@growthbook/growthbook": "^0.18.1",
"@growthbook/growthbook-react": "^0.9.1",
"@metamask/browser-passworder": "^3.0.0",
"@growthbook/growthbook": "^0.20.1",
"@growthbook/growthbook-react": "^0.10.1",
"@metamask/browser-passworder": "^4.0.2",
"@mysten/core": "workspace:*",
"@mysten/sui.js": "workspace:*",
"@mysten/wallet-standard": "workspace:*",
"@noble/hashes": "^1.1.2",
"@reduxjs/toolkit": "^1.8.3",
"@scure/bip32": "^1.1.0",
"@noble/hashes": "^1.1.5",
"@reduxjs/toolkit": "^1.9.1",
"@scure/bip32": "^1.1.1",
"@scure/bip39": "^1.1.0",
"@tanstack/react-query": "^4.19.1",
"bignumber.js": "^9.1.0",
"@tanstack/react-query": "^4.20.9",
"bignumber.js": "^9.1.1",
"bootstrap-icons": "^1.9.1",
"buffer": "^6.0.3",
"class-variance-authority": "^0.2.3",
"class-variance-authority": "^0.4.0",
"classnames": "^2.3.2",
"eslint-plugin-react": "^7.31.8",
"eslint-plugin-react": "^7.31.11",
"formik": "^2.2.9",
"framer-motion": "^7.6.19",
"framer-motion": "^8.1.9",
"mitt": "^3.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^3.1.4",
"react-intl": "^6.0.5",
"react-intl": "^6.2.5",
"react-number-format": "^4.9.3",
"react-redux": "^8.0.2",
"react-router-dom": "6.6.1",
"react-textarea-autosize": "^8.3.4",
"rxjs": "^7.5.6",
"react-redux": "^8.0.5",
"react-router-dom": "^6.5.0",
"react-textarea-autosize": "^8.4.0",
"rxjs": "^7.8.0",
"semver": "^7.3.8",
"stream-browserify": "^3.0.0",
"tailwindcss": "^3.2.4",
Expand Down
9 changes: 6 additions & 3 deletions apps/wallet/src/shared/cryptography/keystore.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

import passworder from '@metamask/browser-passworder';
import {
encrypt as metamaskEncrypt,
decrypt as metamaskDecrypt,
} from '@metamask/browser-passworder';

type Serializable =
| string
Expand All @@ -13,12 +16,12 @@ export async function encrypt(
password: string,
secrets: Serializable
): Promise<string> {
return passworder.encrypt(password, secrets);
return metamaskEncrypt(password, secrets);
}

export async function decrypt<T extends Serializable>(
password: string,
ciphertext: string
): Promise<T> {
return await passworder.decrypt(password, ciphertext);
return (await metamaskDecrypt(password, ciphertext)) as T;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"devDependencies": {
"@changesets/cli": "^2.25.2",
"@changesets/cli": "^2.26.0",
"turbo": "^1.6.3"
}
}
Loading

0 comments on commit 1d0cc7e

Please sign in to comment.