Commit 8614614
fix: defer logs RPC call until client is authorized
Skip querying logs:list before client trust is established. The trust request (requestTrust) is async and completes in the background. Meanwhile, useLogs() fires synchronously on component mount, causing an unauthorized RPC error. Guard the initial updateLogs() call with ensureTrusted(), matching the pattern used by shared state. Also guard the logs:updated handler to prevent server pushes from triggering queries while untrusted.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>1 parent dc9218c commit 8614614
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | | - | |
| 71 | + | |
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
| |||
0 commit comments