fix: update known active pairings after session connects

This commit is contained in:
Ben Kremer 2022-07-04 16:41:06 +07:00
parent 55249754f5
commit 248d60e516

View File

@ -131,6 +131,8 @@ export function ClientContextProvider({ children }: { children: ReactNode | Reac
const session = await approval();
console.log("Established session:", session);
await onSessionConnected(session);
// Update known pairings after session is connected.
setPairings(client.pairing.getAll({ active: true }));
} catch (e) {
console.error(e);
// ignore rejection