()
| 1961 | const ConnectionStoreContext = createContext<ConnectionStoreApi | null>(null) |
| 1962 | |
| 1963 | export function useConnectionStore(): ConnectionStoreApi { |
| 1964 | const ctx = useContext(ConnectionStoreContext) |
| 1965 | if (!ctx) { |
| 1966 | throw new Error( |
| 1967 | "useConnectionStore must be used within AcpConnectionsProvider" |
| 1968 | ) |
| 1969 | } |
| 1970 | return ctx |
| 1971 | } |
| 1972 | |
| 1973 | // ── Actions context (unchanged interface) ── |
| 1974 |
no outgoing calls