This commit is contained in:
Ilja 2022-03-04 14:08:29 +02:00
commit 1cd9228dad
2 changed files with 12 additions and 0 deletions

View File

@ -115,6 +115,12 @@ export function ClientContextProvider({ children }: { children: ReactNode | Reac
setPairings(_client.pairing.topics); setPairings(_client.pairing.topics);
}); });
_client.on(CLIENT_EVENTS.session.updated, (updatedSession: SessionTypes.Settled) => {
console.log("EVENT", "session_updated");
setAccounts(updatedSession.state.accounts);
setSession(updatedSession);
});
_client.on(CLIENT_EVENTS.session.deleted, () => { _client.on(CLIENT_EVENTS.session.deleted, () => {
console.log("EVENT", "session_deleted"); console.log("EVENT", "session_deleted");
resetApp(); resetApp();

View File

@ -117,6 +117,12 @@ export function ClientContextProvider({ children }: { children: ReactNode | Reac
setPairings(_client.pairing.topics); setPairings(_client.pairing.topics);
}); });
_client.on(CLIENT_EVENTS.session.updated, (updatedSession: SessionTypes.Settled) => {
console.log("EVENT", "session_updated");
setAccounts(updatedSession.state.accounts);
setSession(updatedSession);
});
_client.on(CLIENT_EVENTS.session.deleted, () => { _client.on(CLIENT_EVENTS.session.deleted, () => {
console.log("EVENT", "session_deleted"); console.log("EVENT", "session_deleted");
resetApp(); resetApp();