From 4ca506eebe34c8438586904ebcc1dc4886d436a0 Mon Sep 17 00:00:00 2001 From: hubcio2115 Date: Wed, 26 Nov 2025 12:04:37 +0100 Subject: [PATCH 1/7] renamed Account with Passkey whenever current account is a passkey account --- apps/signer/src/pages/wallet/Wallet.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/signer/src/pages/wallet/Wallet.tsx b/apps/signer/src/pages/wallet/Wallet.tsx index b1d6c23..3aa2b33 100644 --- a/apps/signer/src/pages/wallet/Wallet.tsx +++ b/apps/signer/src/pages/wallet/Wallet.tsx @@ -59,6 +59,8 @@ export default function Wallet() { const [privateKeyVisible, setPrivateKeyVisible] = useState(false); + const isPasskeyAccount = account?.[StorageKeys.PRIVATE_KEY] === null; + return (
@@ -70,8 +72,8 @@ export default function Wallet() {
- +
From c390f43a0a613172f9a46d60435de961840d2b0a Mon Sep 17 00:00:00 2001 From: hubcio2115 Date: Wed, 26 Nov 2025 12:17:50 +0100 Subject: [PATCH 2/7] deleted unused dependencies --- apps/signer/package.json | 8 +- pnpm-lock.yaml | 159 +++++++++++++++++++-------------------- 2 files changed, 80 insertions(+), 87 deletions(-) diff --git a/apps/signer/package.json b/apps/signer/package.json index 4738b6a..fa3d84a 100644 --- a/apps/signer/package.json +++ b/apps/signer/package.json @@ -11,8 +11,6 @@ "lint": "eslint" }, "dependencies": { - "passkey-signer": "workspace:*", - "passkey-signer-react": "workspace:*", "@better-fetch/fetch": "^1.1.18", "@jstz-dev/jstz-client": "0.1.1-alpha.5", "@jstz-dev/jstz_sdk": "0.1.1-alpha.5", @@ -24,18 +22,16 @@ "@taquito/utils": "^22.0.0", "@uidotdev/usehooks": "^2.4.1", "bip39": "^3.1.0", - "bs58": "^6.0.0", - "cbor": "^10.0.11", "ed25519-hd-key": "^1.3.0", "jstz-ui": "workspace:*", "lucide-react": "^0.554.0", "nuqs": "^2.8.0", + "passkey-signer": "workspace:*", + "passkey-signer-react": "workspace:*", "react": "~19.2.0", "react-dom": "~19.2.0", "react-router": "^7.9.6", "superjson": "^2.2.5", - "tailwind-merge": "^3.4.0", - "tw-animate-css": "^1.4.0", "zod": "^4.1.12", "zustand": "^5.0.8" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 50bf5ca..e0af8d3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -56,12 +56,6 @@ importers: bip39: specifier: ^3.1.0 version: 3.1.0 - bs58: - specifier: ^6.0.0 - version: 6.0.0 - cbor: - specifier: ^10.0.11 - version: 10.0.11 ed25519-hd-key: specifier: ^1.3.0 version: 1.3.0 @@ -86,18 +80,15 @@ importers: react-dom: specifier: ~19.2.0 version: 19.2.0(react@19.2.0) + react-error-boundary: + specifier: ^6.0.0 + version: 6.0.0(react@19.2.0) react-router: specifier: ^7.9.6 version: 7.9.6(react-dom@19.2.0(react@19.2.0))(react@19.2.0) superjson: specifier: ^2.2.5 version: 2.2.5 - tailwind-merge: - specifier: ^3.4.0 - version: 3.4.0 - tw-animate-css: - specifier: ^1.4.0 - version: 1.4.0 zod: specifier: ^4.1.12 version: 4.1.12 @@ -178,22 +169,22 @@ importers: packages/jstz-ui: dependencies: '@radix-ui/react-accordion': - specifier: ^1.2.11 + specifier: ^1.2.12 version: 1.2.12(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-checkbox': - specifier: ^1.3.2 + specifier: ^1.3.3 version: 1.3.3(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-dialog': - specifier: ^1.1.14 + specifier: ^1.1.15 version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-dropdown-menu': - specifier: ^2.1.15 + specifier: ^2.1.16 version: 2.1.16(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-label': specifier: ^2.1.7 version: 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-select': - specifier: ^2.2.5 + specifier: ^2.2.6 version: 2.2.6(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-separator': specifier: ^1.1.7 @@ -202,19 +193,19 @@ importers: specifier: ^1.2.3 version: 1.2.3(@types/react@19.2.6)(react@19.2.0) '@radix-ui/react-switch': - specifier: ^1.2.5 + specifier: ^1.2.6 version: 1.2.6(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-tabs': - specifier: ^1.1.12 + specifier: ^1.1.13 version: 1.1.13(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-tooltip': - specifier: ^1.2.7 + specifier: ^1.2.8 version: 1.2.8(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-visually-hidden': specifier: ^1.2.3 version: 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@tailwindcss/vite': - specifier: ^4.1.11 + specifier: ^4.1.14 version: 4.1.17(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2)) clsx: specifier: ^2.1.1 @@ -223,95 +214,95 @@ importers: specifier: 1.0.0-beta.4 version: 1.0.0-beta.4(typescript@5.9.3) lucide-react: - specifier: ^0.536.0 - version: 0.536.0(react@19.2.0) - react: - specifier: ^19.0.0 - version: 19.2.0 - react-dom: - specifier: ^19.1.1 - version: 19.2.0(react@19.2.0) + specifier: ^0.546.0 + version: 0.546.0(react@19.2.0) react-resizable-panels: - specifier: ^3.0.4 + specifier: ^3.0.6 version: 3.0.6(react-dom@19.2.0(react@19.2.0))(react@19.2.0) react-syntax-highlighter: - specifier: ^15.6.1 + specifier: ^15.6.6 version: 15.6.6(react@19.2.0) tailwind-merge: specifier: ^3.3.1 version: 3.3.1 tailwindcss: - specifier: ^4.1.11 + specifier: ^4.1.14 version: 4.1.17 devDependencies: '@chromatic-com/storybook': - specifier: ^4.1.0 + specifier: ^4.1.1 version: 4.1.1(storybook@9.1.13(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2))) '@eslint/js': - specifier: ^9.32.0 + specifier: ^9.36.0 version: 9.39.1 '@storybook/addon-a11y': - specifier: ^9.1.1 + specifier: ^9.1.10 version: 9.1.13(storybook@9.1.13(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2))) '@storybook/addon-docs': - specifier: ^9.1.1 + specifier: ^9.1.10 version: 9.1.13(@types/react@19.2.6)(storybook@9.1.13(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2))) '@storybook/addon-onboarding': - specifier: ^9.1.1 + specifier: ^9.1.10 version: 9.1.13(storybook@9.1.13(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2))) '@storybook/addon-vitest': - specifier: ^9.1.1 + specifier: ^9.1.10 version: 9.1.13(@vitest/browser@3.2.4)(@vitest/runner@3.2.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(storybook@9.1.13(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2)))(vitest@3.2.4) '@storybook/builder-vite': - specifier: ^9.1.1 + specifier: ^9.1.10 version: 9.1.13(storybook@9.1.13(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2)))(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2)) '@storybook/react-vite': - specifier: ^9.1.1 + specifier: ^9.1.10 version: 9.1.13(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(rollup@4.53.3)(storybook@9.1.13(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2)))(typescript@5.9.3)(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2)) '@types/node': specifier: ^22 version: 22.18.12 '@types/react': - specifier: ^19.1.9 + specifier: ^19.2.0 version: 19.2.6 '@types/react-dom': - specifier: ^19.1.7 + specifier: ^19.2.0 version: 19.2.3(@types/react@19.2.6) '@vitejs/plugin-react': - specifier: ^4.7.0 - version: 4.7.0(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2)) + specifier: ^5.0.4 + version: 5.1.1(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2)) '@vitest/browser': specifier: ^3.2.4 version: 3.2.4(playwright@1.56.1)(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2))(vitest@3.2.4) eslint: - specifier: ^9.32.0 + specifier: ^9.36.0 version: 9.39.1(jiti@2.6.1) eslint-plugin-react-hooks: - specifier: ^5.2.0 - version: 5.2.0(eslint@9.39.1(jiti@2.6.1)) + specifier: ^6.1.0 + version: 6.1.1(eslint@9.39.1(jiti@2.6.1)) eslint-plugin-storybook: - specifier: ^9.1.1 + specifier: ^9.1.10 version: 9.1.13(eslint@9.39.1(jiti@2.6.1))(storybook@9.1.13(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2)))(typescript@5.9.3) globals: - specifier: ^16.3.0 + specifier: ^16.4.0 version: 16.5.0 playwright: - specifier: ^1.54.2 + specifier: ^1.55.1 version: 1.56.1 + react: + specifier: ~19.2.0 + version: 19.2.0 + react-dom: + specifier: ~19.2.0 + version: 19.2.0(react@19.2.0) storybook: - specifier: ^9.1.1 + specifier: ^9.1.10 version: 9.1.13(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2)) tw-animate-css: - specifier: ^1.3.6 + specifier: ^1.4.0 version: 1.4.0 typescript: - specifier: ^5.9.2 + specifier: ^5.9.3 version: 5.9.3 typescript-eslint: - specifier: ^8.38.0 + specifier: ^8.45.0 version: 8.47.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) vite: - specifier: ^7.0.6 + specifier: ^7.1.9 version: 7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2) vitest: specifier: ^3.2.4 @@ -1343,9 +1334,6 @@ packages: cpu: [x64] os: [win32] - '@rolldown/pluginutils@1.0.0-beta.27': - resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==} - '@rolldown/pluginutils@1.0.0-beta.47': resolution: {integrity: sha512-8QagwMH3kNCuzD8EWL8R2YPW5e4OrHNSAHRFDdmFqEwEaD/KcNKjVoumo+gP2vW5eKB2UPbM6vTYiGZX0ixLnw==} @@ -2083,9 +2071,9 @@ packages: peerDependencies: vite: ^4 || ^5 || ^6 || ^7 - '@vitejs/plugin-react@4.7.0': - resolution: {integrity: sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==} - engines: {node: ^14.18.0 || >=16.0.0} + '@vitejs/plugin-react@5.1.1': + resolution: {integrity: sha512-WQfkSw0QbQ5aJ2CHYw23ZGkqnRwqKHD/KYsMeTkZzPT4Jcf0DcBxBtwMJxnu6E7oxw5+JC6ZAiePgh28uJ1HBA==} + engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 @@ -2707,9 +2695,9 @@ packages: peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - eslint-plugin-react-hooks@5.2.0: - resolution: {integrity: sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==} - engines: {node: '>=10'} + eslint-plugin-react-hooks@6.1.1: + resolution: {integrity: sha512-St9EKZzOAQF704nt2oJvAKZHjhrpg25ClQoaAlHmPZuajFldVLqRDW4VBNAS01NzeiQF0m0qhG1ZA807K6aVaQ==} + engines: {node: '>=18'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 @@ -3381,8 +3369,8 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - lucide-react@0.536.0: - resolution: {integrity: sha512-2PgvNa9v+qz4Jt/ni8vPLt4jwoFybXHuubQT8fv4iCW5TjDxkbZjNZZHa485ad73NSEn/jdsEtU57eE1g+ma8A==} + lucide-react@0.546.0: + resolution: {integrity: sha512-Z94u6fKT43lKeYHiVyvyR8fT7pwCzDu7RyMPpTvh054+xahSgj4HFQ+NmflvzdXsoAjYGdCguGaFKYuvq0ThCQ==} peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -3897,14 +3885,19 @@ packages: peerDependencies: react: ^19.2.0 + react-error-boundary@6.0.0: + resolution: {integrity: sha512-gdlJjD7NWr0IfkPlaREN2d9uUZUlksrfOx7SX62VRerwXbMY6ftGCIZua1VG1aXFNOimhISsTq+Owp725b9SiA==} + peerDependencies: + react: '>=16.13.1' + react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} react-is@17.0.2: resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} - react-refresh@0.17.0: - resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==} + react-refresh@0.18.0: + resolution: {integrity: sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==} engines: {node: '>=0.10.0'} react-remove-scroll-bar@2.3.8: @@ -4269,9 +4262,6 @@ packages: tailwind-merge@3.3.1: resolution: {integrity: sha512-gBXpgUm/3rp1lMZZrM/w7D8GKqshif0zAymAhbCyIt8KMe+0v9DQ7cdYLR4FHH/cKpdTXb+A/tKKU3eolfsI+g==} - tailwind-merge@3.4.0: - resolution: {integrity: sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==} - tailwindcss@4.1.17: resolution: {integrity: sha512-j9Ee2YjuQqYT9bbRTfTZht9W/ytp5H+jJpZKiYdP/bpnXARAuELt9ofP0lPnmHjbga7SNQIxdTAXCmtKVYjN+Q==} @@ -5708,8 +5698,6 @@ snapshots: '@rolldown/binding-win32-x64-msvc@1.0.0-beta.51': optional: true - '@rolldown/pluginutils@1.0.0-beta.27': {} - '@rolldown/pluginutils@1.0.0-beta.47': {} '@rolldown/pluginutils@1.0.0-beta.51': {} @@ -6507,14 +6495,14 @@ snapshots: transitivePeerDependencies: - '@swc/helpers' - '@vitejs/plugin-react@4.7.0(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2))': + '@vitejs/plugin-react@5.1.1(vite@7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2))': dependencies: '@babel/core': 7.28.5 '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.5) '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.28.5) - '@rolldown/pluginutils': 1.0.0-beta.27 + '@rolldown/pluginutils': 1.0.0-beta.47 '@types/babel__core': 7.20.5 - react-refresh: 0.17.0 + react-refresh: 0.18.0 vite: 7.2.2(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2) transitivePeerDependencies: - supports-color @@ -7292,9 +7280,15 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-react-hooks@5.2.0(eslint@9.39.1(jiti@2.6.1)): + eslint-plugin-react-hooks@6.1.1(eslint@9.39.1(jiti@2.6.1)): dependencies: + '@babel/core': 7.28.5 + '@babel/parser': 7.28.5 eslint: 9.39.1(jiti@2.6.1) + zod: 4.1.12 + zod-validation-error: 4.0.2(zod@4.1.12) + transitivePeerDependencies: + - supports-color eslint-plugin-react-hooks@7.0.1(eslint@9.39.1(jiti@2.6.1)): dependencies: @@ -7982,7 +7976,7 @@ snapshots: dependencies: yallist: 3.1.1 - lucide-react@0.536.0(react@19.2.0): + lucide-react@0.546.0(react@19.2.0): dependencies: react: 19.2.0 @@ -8535,11 +8529,16 @@ snapshots: react: 19.2.0 scheduler: 0.27.0 + react-error-boundary@6.0.0(react@19.2.0): + dependencies: + '@babel/runtime': 7.28.4 + react: 19.2.0 + react-is@16.13.1: {} react-is@17.0.2: {} - react-refresh@0.17.0: {} + react-refresh@0.18.0: {} react-remove-scroll-bar@2.3.8(@types/react@19.2.6)(react@19.2.0): dependencies: @@ -9015,8 +9014,6 @@ snapshots: tailwind-merge@3.3.1: {} - tailwind-merge@3.4.0: {} - tailwindcss@4.1.17: {} tapable@2.3.0: {} From 9d1ba809e43c06fae277b999bbd1c95bae8782b5 Mon Sep 17 00:00:00 2001 From: hubcio2115 Date: Wed, 26 Nov 2025 12:17:57 +0100 Subject: [PATCH 3/7] installed react-error-boundary --- apps/signer/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/signer/package.json b/apps/signer/package.json index fa3d84a..4f94ba5 100644 --- a/apps/signer/package.json +++ b/apps/signer/package.json @@ -30,6 +30,7 @@ "passkey-signer-react": "workspace:*", "react": "~19.2.0", "react-dom": "~19.2.0", + "react-error-boundary": "^6.0.0", "react-router": "^7.9.6", "superjson": "^2.2.5", "zod": "^4.1.12", From 34b95bf4d3bcbb365382d10537ec66ee12ef022e Mon Sep 17 00:00:00 2001 From: hubcio2115 Date: Wed, 26 Nov 2025 12:18:11 +0100 Subject: [PATCH 4/7] added onAccountSelected hook in AccountSelect --- apps/signer/src/components/AccountSelect.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/signer/src/components/AccountSelect.tsx b/apps/signer/src/components/AccountSelect.tsx index 7414549..4126c09 100644 --- a/apps/signer/src/components/AccountSelect.tsx +++ b/apps/signer/src/components/AccountSelect.tsx @@ -10,9 +10,14 @@ import { useVault } from "~/lib/vaultStore.ts"; interface AccountSelectProps { selectedAccount: string | undefined; canAddWallet?: boolean; + onAccountSelected?: (accountAddress: string) => void; } -export function AccountSelect({ selectedAccount, canAddWallet = true }: AccountSelectProps) { +export function AccountSelect({ + selectedAccount, + canAddWallet = true, + onAccountSelected = () => {}, +}: AccountSelectProps) { const navigate = useNavigate(); const location = useLocation(); @@ -20,6 +25,7 @@ export function AccountSelect({ selectedAccount, canAddWallet = true }: AccountS function handleOnSelect(newValue: string & {}) { setCurrentAddress(newValue); + onAccountSelected(newValue); void navigate(`/wallets/${newValue}${location.search}`); } From 374cb830be37431b3c531296be1beba255609a54 Mon Sep 17 00:00:00 2001 From: hubcio2115 Date: Wed, 26 Nov 2025 12:18:53 +0100 Subject: [PATCH 5/7] added an error-boundary for fetching balance which fixes balance not updating after address change in an error state --- apps/signer/src/pages/wallet/Wallet.tsx | 53 ++++++++++++++++++++----- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/apps/signer/src/pages/wallet/Wallet.tsx b/apps/signer/src/pages/wallet/Wallet.tsx index 7835ea3..e65a394 100644 --- a/apps/signer/src/pages/wallet/Wallet.tsx +++ b/apps/signer/src/pages/wallet/Wallet.tsx @@ -1,4 +1,5 @@ -import { useSuspenseQuery } from "@tanstack/react-query"; +import { QueryErrorResetBoundary, useSuspenseQuery } from "@tanstack/react-query"; +import { ErrorBoundary } from "react-error-boundary"; import { Alert, AlertDescription } from "jstz-ui/ui/alert"; import { Button } from "jstz-ui/ui/button"; @@ -9,7 +10,7 @@ import { cn } from "jstz-ui/utils"; import { Eye, EyeOff } from "lucide-react"; import { useQueryStates } from "nuqs"; import { usePasskeyWallet } from "passkey-signer-react"; -import { Suspense, useState } from "react"; +import { Suspense, useRef, useState } from "react"; import { redirect, useParams, type LoaderFunctionArgs } from "react-router"; import SuperJSON from "superjson"; import { z } from "zod/v4-mini"; @@ -61,6 +62,8 @@ export default function Wallet() { const isPasskeyAccount = account?.[StorageKeys.PRIVATE_KEY] === null; + const resetBalanceErrorBoundary = useRef(() => {}); + return (
@@ -72,16 +75,45 @@ export default function Wallet() {
- + resetBalanceErrorBoundary.current()} + />
- }> - - + + {({ reset }) => ( + { + resetBalanceErrorBoundary.current = resetErrorBoundary; + + return ( + + +

n/a

+
+
+ ); + }} + > + }> + + +
+ )} +
@@ -97,7 +129,7 @@ export default function Wallet() { {account?.[StorageKeys.PUBLIC_KEY] ?? ""}
- {account?.[StorageKeys.PRIVATE_KEY] !== null && ( + {!isPasskeyAccount && (
@@ -259,7 +291,7 @@ function Balance({ address }: BalanceProps) { const currentNetwork = useVault.use.currentNetwork(); const { - data: { data: balance, error }, + data: { data: balance }, } = useSuspenseQuery({ queryKey: ["balance", address, currentNetwork], queryFn: () => @@ -280,9 +312,10 @@ function Balance({ address }: BalanceProps) { "h-8 items-center justify-center", )} > -

{!error ? toTezString(balance) : "n/a"}

+

{toTezString(balance)}

+

{toTezString(balance)}

@@ -292,5 +325,5 @@ function Balance({ address }: BalanceProps) { } function BalanceFallback() { - return ; + return ; } From 7804bcf8453a8443b5f474df7df02fae34f99c1a Mon Sep 17 00:00:00 2001 From: hubcio2115 Date: Wed, 26 Nov 2025 12:19:00 +0100 Subject: [PATCH 6/7] updated jstz-ui --- packages/jstz-ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jstz-ui b/packages/jstz-ui index 705d2a1..9aae825 160000 --- a/packages/jstz-ui +++ b/packages/jstz-ui @@ -1 +1 @@ -Subproject commit 705d2a19f4802d3587879f8b8ef2ec031c74c43d +Subproject commit 9aae825b470ff3882a24697fc5e7270a60e70362 From d639258aabc5411279e104a8f006a6114ed8a80a Mon Sep 17 00:00:00 2001 From: hubcio2115 Date: Wed, 26 Nov 2025 13:38:59 +0100 Subject: [PATCH 7/7] formatted imports --- apps/signer/src/pages/wallet/Wallet.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/signer/src/pages/wallet/Wallet.tsx b/apps/signer/src/pages/wallet/Wallet.tsx index e65a394..f5b37b3 100644 --- a/apps/signer/src/pages/wallet/Wallet.tsx +++ b/apps/signer/src/pages/wallet/Wallet.tsx @@ -1,6 +1,4 @@ import { QueryErrorResetBoundary, useSuspenseQuery } from "@tanstack/react-query"; -import { ErrorBoundary } from "react-error-boundary"; - import { Alert, AlertDescription } from "jstz-ui/ui/alert"; import { Button } from "jstz-ui/ui/button"; import { Label } from "jstz-ui/ui/label"; @@ -11,9 +9,11 @@ import { Eye, EyeOff } from "lucide-react"; import { useQueryStates } from "nuqs"; import { usePasskeyWallet } from "passkey-signer-react"; import { Suspense, useRef, useState } from "react"; +import { ErrorBoundary } from "react-error-boundary"; import { redirect, useParams, type LoaderFunctionArgs } from "react-router"; import SuperJSON from "superjson"; import { z } from "zod/v4-mini"; + import { AccountSelect } from "~/components/AccountSelect"; import { CopyContainer, @@ -32,6 +32,7 @@ import { ResponseEventTypes, type SignOperationContent, } from "~/scripts/service-worker"; + import { walletParsers } from "./url-params"; export function loader({ params }: LoaderFunctionArgs) {