qie-forge/apps/web/package.json
caelum0x 33ba5c3475 fix: WalletProvider never subscribed to wallet accountsChanged/chainChanged
Eip1193Provider has always declared the standard on/removeListener event
hooks, but nothing in the app ever called them. Once connect() set
address/chain once, the UI kept using a stale address forever after the
user switched accounts or networks inside their wallet post-connect -
every subsequent vault/pool read and wallet-signed write kept targeting
the wrong account with no indication anything changed.

Wires accountsChanged (sync address, clear on wallet-side disconnect) and
chainChanged (drop the stale address + surface an error, forcing a
reconnect that re-validates the chain) through WalletProvider. Adds a
real regression test driving the actual component against a mock
EIP-1193 provider - confirmed it fails on the pre-fix code and passes
post-fix. First test suite for apps/web (vitest + jsdom + testing-library,
wired into the root test/lint scripts alongside core/cli).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-29 13:49:34 +03:00

33 lines
708 B
JSON

{
"name": "@qie-forge/web",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint",
"test": "vitest run"
},
"dependencies": {
"@qie-forge/core": "0.1.0",
"next": "16.4.3",
"react": "19.3.0",
"react-dom": "19.3.0",
"viem": "^2.21.0"
},
"devDependencies": {
"@tailwindcss/turbopack": "^4",
"@testing-library/react": "^16.3.3",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "16.4.3",
"jsdom": "^29.1.1",
"tailwindcss": "^4",
"typescript": "^5",
"vitest": "^2.1.9"
}
}