Merge branch 'fix/session-update-handling' into main

This commit is contained in:
Ben Kremer 2022-03-04 10:22:27 +00:00
commit 6eec915a46

View File

@ -190,6 +190,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");
setChains(updatedSession.permissions.blockchain.chains);
setAccounts(updatedSession.state.accounts);
});
_client.on(CLIENT_EVENTS.session.deleted, () => { _client.on(CLIENT_EVENTS.session.deleted, () => {
console.log("EVENT", "session_deleted"); console.log("EVENT", "session_deleted");
resetApp(); resetApp();