Skip to content

Commit 594b503

Browse files
fix(wallet): address dependency vulnerabilities and upgrade to Next.js 16 (#979)
* fix(wallet): address dependency vulnerabilities - Update direct dependencies to patch transitive vulnerabilities - Add pnpm overrides for protobufjs, elliptic, prismjs, @babel/runtime - Remove @solana/spl-token to eliminate bigint-buffer vulnerability - Remove SPL token transfer functionality (not critical) Reduces vulnerabilities from 30 to 2 (both without stable patches). Co-authored-by: Cursor <cursoragent@cursor.com> * fix(wallet): fix breaking changes from dependency updates - Update MultiversX SDK to v15: replace SignableMessage with Message/MessageComputer, replace Transaction.fromPlainObject with newFromPlainObject, use TransactionComputer - Update Sui SDK to v2: replace SuiClient with SuiJsonRpcClient, add network param - Update permissionless imports: use permissionless/types instead of internal paths - Add TypeScript 5.4.5 and moduleResolution: bundler for ESM support - Fix NextUI Tooltip props for stricter types - Add explicit event types for onClick handlers - Define local KeySigner type to replace viem internal import Co-authored-by: Cursor <cursoragent@cursor.com> * feat(wallet): upgrade to Next.js 16 and React 19 - Upgrade next 15.5.10 → 16.1.6 - Upgrade react/react-dom 18.2.0 → 19.1.0 - Upgrade framer-motion 6.5.1 → 11.18.x (React 19 compatible) - Upgrade valtio 1.13.2 → 2.1.x (React 19 compatible) - Add turbopack config with empty object for webpack compat - Fix AnimatePresence: replace deprecated exitBeforeEnter with mode="wait" - Fix JSX.Element type annotations (removed for React 19 compat) - Use --webpack flag for build (turbopack has fs module issues) This resolves the moderate Next.js PPR Resume Endpoint vulnerability. Remaining: 1 low-severity elliptic vulnerability (no patch available). Co-authored-by: Cursor <cursoragent@cursor.com> * fix(wallet): use webpack for build to fix Vercel deployment Turbopack (default in Next.js 16) doesn't support the fs fallback needed by @multiversx/sdk-core. Use --webpack flag explicitly. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(wallet): fix UI styling issues for React 19 compatibility - Create StyledDivider component with explicit background for visibility - Replace all Divider usages with StyledDivider throughout the app - Fix PageHeader flex alignment for Account picker dropdown - Fix Input border styling on walletconnect page - Constrain Modal max-width to 420px to match main content area NextUI v1 components lose some default styles in React 19 due to CSS-in-JS (Stitches) rendering differences. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent ee5434b commit 594b503

File tree

59 files changed

+4004
-3304
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+4004
-3304
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
33
/// <reference types="next/navigation-types/compat/navigation" />
4-
/// <reference path="./.next/types/routes.d.ts" />
4+
import "./.next/types/routes.d.ts";
55

66
// NOTE: This file should not be edited
77
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

advanced/wallets/react-wallet-v2/next.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
module.exports = {
22
reactStrictMode: true,
3+
turbopack: {
4+
resolveAlias: {
5+
fs: { browser: './node_modules/next/dist/compiled/edge-runtime/primitives/crypto.js' },
6+
path: { browser: 'path-browserify' }
7+
}
8+
},
39
webpack(config) {
410
config.resolve.fallback = {
511
...config.resolve.fallback,

advanced/wallets/react-wallet-v2/package.json

Lines changed: 58 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3,53 +3,52 @@
33
"private": true,
44
"scripts": {
55
"dev": "next dev -p 3001",
6-
"build": "next build",
6+
"build": "next build --webpack",
77
"start": "next start -p 3001",
88
"lint": "next lint",
99
"prettier": "prettier --check '**/*.{js,ts,jsx,tsx}'",
1010
"prettier:write": "prettier --write '**/*.{js,ts,jsx,tsx}'"
1111
},
1212
"dependencies": {
13-
"@cosmjs/amino": "0.32.3",
14-
"@cosmjs/encoding": "0.32.3",
15-
"@cosmjs/proto-signing": "0.32.3",
16-
"@emotion/react": "^11.11.1",
17-
"@emotion/styled": "^11.11.0",
13+
"@cosmjs/amino": "0.32.4",
14+
"@cosmjs/encoding": "0.32.4",
15+
"@cosmjs/proto-signing": "0.32.4",
16+
"@emotion/react": "^11.14.0",
17+
"@emotion/styled": "^11.14.1",
1818
"@ethersproject/providers": "^5.8.0",
1919
"@json-rpc-tools/utils": "1.7.6",
20-
"@kadena/cryptography-utils": "^0.4.0",
21-
"@kadena/types": "^0.6.0",
20+
"@kadena/cryptography-utils": "^0.4.4",
21+
"@kadena/types": "^0.6.2",
2222
"@material-ui/core": "^4.12.4",
2323
"@material-ui/icons": "^4.11.3",
24-
"@mui/icons-material": "^5.14.9",
25-
"@mui/material": "^5.14.10",
26-
"@multiversx/sdk-core": "12.18.0",
24+
"@mui/icons-material": "^5.18.0",
25+
"@mui/material": "^5.18.0",
26+
"@multiversx/sdk-core": "15.3.2",
2727
"@multiversx/sdk-wallet": "4.2.0",
28-
"@mysten/sui": "^1.29.1",
29-
"@near-wallet-selector/wallet-utils": "^8.0.0",
28+
"@mysten/sui": "^2.1.0",
29+
"@near-wallet-selector/wallet-utils": "^8.10.2",
3030
"@nextui-org/react": "1.0.8-beta.5",
31-
"@noble/curves": "^1.6.0",
31+
"@noble/curves": "^1.9.7",
3232
"@noble/hashes": "^1.8.0",
3333
"@noble/secp256k1": "^3.0.0",
34-
"@polkadot/keyring": "^10.1.2",
35-
"@polkadot/types": "^9.3.3",
36-
"@polkadot/util": "^10.1.2",
37-
"@polkadot/util-crypto": "^10.1.2",
38-
"@reown/appkit-experimental": "1.6.8",
34+
"@polkadot/keyring": "^10.4.2",
35+
"@polkadot/types": "^9.14.2",
36+
"@polkadot/util": "^10.4.2",
37+
"@polkadot/util-crypto": "^10.4.2",
38+
"@reown/appkit-experimental": "1.8.17",
3939
"@reown/walletkit": "1.5.0",
4040
"@rhinestone/module-sdk": "0.1.25",
41-
"@solana/spl-token": "^0.4.13",
4241
"@solana/web3.js": "1.98.2",
43-
"@stacks/network": "^7.2.0",
44-
"@stacks/transactions": "^7.2.0",
45-
"@stacks/wallet-sdk": "^7.0.6",
46-
"@taquito/local-forging": "^23.0.1",
47-
"@taquito/signer": "^15.1.0",
48-
"@taquito/taquito": "^15.1.0",
42+
"@stacks/network": "^7.3.1",
43+
"@stacks/transactions": "^7.3.1",
44+
"@stacks/wallet-sdk": "^7.2.0",
45+
"@taquito/local-forging": "^24.0.2",
46+
"@taquito/signer": "^24.0.2",
47+
"@taquito/taquito": "^24.0.2",
4948
"@ton/core": "^0.61.0",
5049
"@ton/crypto": "^3.3.0",
51-
"@ton/ton": "^15.3.1",
52-
"@types/semver": "^7.5.8",
50+
"@ton/ton": "^15.4.0",
51+
"@types/semver": "^7.7.1",
5352
"@walletconnect/core": "2.23.4",
5453
"@walletconnect/pay": "1.0.2-canary.0",
5554
"@walletconnect/types": "2.23.4",
@@ -59,48 +58,57 @@
5958
"@zerodev/sdk": "5.3.1",
6059
"@zerodev/session-key": "5.4.0",
6160
"@zerodev/weighted-ecdsa-validator": "5.3.0",
62-
"axios": "^1.12.2",
61+
"axios": "^1.13.4",
6362
"bip32": "^4.0.0",
6463
"bip39": "^3.1.0",
65-
"bitcoinjs-lib": "^6.1.5",
64+
"bitcoinjs-lib": "^6.1.7",
6665
"bitcoinjs-message": "^2.2.0",
6766
"borsh": "^1.0.0",
6867
"bs58": "6.0.0",
6968
"cosmos-wallet": "1.2.0",
7069
"crc-32": "^1.2.2",
7170
"ecpair": "^2.1.0",
7271
"ed25519-hd-key": "^1.3.0",
73-
"ethers": "5.7.2",
74-
"framer-motion": "6.5.1",
75-
"graphql": "^16.8.2",
76-
"near-api-js": "^0.45.0",
72+
"ethers": "5.8.0",
73+
"framer-motion": "^11.18.0",
74+
"graphql": "^16.12.0",
75+
"near-api-js": "^0.45.1",
7776
"near-seed-phrase": "^0.2.1",
78-
"next": "15.5.9",
77+
"next": "16.1.6",
7978
"permissionless": "0.1.43",
80-
"react": "18.2.0",
79+
"react": "19.1.0",
8180
"react-code-blocks": "0.1.5",
82-
"react-dom": "18.2.0",
83-
"react-hot-toast": "^2.4.1",
81+
"react-dom": "19.1.0",
82+
"react-hot-toast": "^2.6.0",
8483
"react-qr-reader-es6": "2.2.1-2",
8584
"solana-wallet": "^1.0.2",
86-
"tiny-secp256k1": "^2.2.3",
87-
"tronweb": "^6.0.4",
85+
"tiny-secp256k1": "^2.2.4",
86+
"tronweb": "^6.1.1",
8887
"tweetnacl": "^1.0.3",
89-
"valtio": "1.13.2",
88+
"valtio": "^2.1.0",
9089
"viem": "2.17.8",
9190
"webauthn-p256": "0.0.2",
92-
"zod": "^3.22.4"
91+
"zod": "^3.25.76"
9392
},
9493
"devDependencies": {
9594
"@types/node": "17.0.35",
96-
"@types/react": "18.2.61",
97-
"@types/react-dom": "18.2.19",
98-
"eslint": "8.15.0",
99-
"eslint-config-next": "14.1.3",
100-
"eslint-config-prettier": "8.5.0",
101-
"eslint-plugin-package-json": "^0.13.1",
102-
"jsonc-eslint-parser": "^2.4.0",
95+
"@types/react": "19.1.6",
96+
"@types/react-dom": "19.1.6",
97+
"eslint": "9.39.2",
98+
"eslint-config-next": "16.1.6",
99+
"eslint-config-prettier": "10.1.5",
100+
"eslint-plugin-package-json": "^0.88.2",
101+
"jsonc-eslint-parser": "^2.4.2",
103102
"prettier": "2.6.2",
104-
"typescript": "5.2.2"
103+
"typescript": "5.4.5"
104+
},
105+
"pnpm": {
106+
"overrides": {
107+
"protobufjs@>=6.10.0 <6.11.4": ">=6.11.4",
108+
"protobufjs@>=7.0.0 <7.2.5": ">=7.2.5",
109+
"elliptic@<=6.6.0": ">=6.6.1",
110+
"prismjs@<1.30.0": ">=1.30.0",
111+
"@babel/runtime@<7.26.10": ">=7.26.10"
112+
}
105113
}
106114
}

0 commit comments

Comments
 (0)