Merge branch 'main' of https://github.com/WalletConnect/web-examples
This commit is contained in:
commit
1cd9228dad
@ -115,6 +115,12 @@ export function ClientContextProvider({ children }: { children: ReactNode | Reac
|
||||
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, () => {
|
||||
console.log("EVENT", "session_deleted");
|
||||
resetApp();
|
||||
|
@ -117,6 +117,12 @@ export function ClientContextProvider({ children }: { children: ReactNode | Reac
|
||||
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, () => {
|
||||
console.log("EVENT", "session_deleted");
|
||||
resetApp();
|
||||
|
Loading…
Reference in New Issue
Block a user