refactor(dapp-v2): rename resetApp
-> reset
This commit is contained in:
parent
112465b5c7
commit
c4759249b6
@ -64,7 +64,7 @@ export function ClientContextProvider({ children }: { children: ReactNode | Reac
|
|||||||
const [solanaPublicKeys, setSolanaPublicKeys] = useState<Record<string, PublicKey>>();
|
const [solanaPublicKeys, setSolanaPublicKeys] = useState<Record<string, PublicKey>>();
|
||||||
const [chains, setChains] = useState<string[]>([]);
|
const [chains, setChains] = useState<string[]>([]);
|
||||||
|
|
||||||
const resetApp = () => {
|
const reset = () => {
|
||||||
setPairings([]);
|
setPairings([]);
|
||||||
setSession(undefined);
|
setSession(undefined);
|
||||||
setBalances({});
|
setBalances({});
|
||||||
@ -208,7 +208,7 @@ export function ClientContextProvider({ children }: { children: ReactNode | Reac
|
|||||||
|
|
||||||
_client.on(CLIENT_EVENTS.session.deleted, () => {
|
_client.on(CLIENT_EVENTS.session.deleted, () => {
|
||||||
console.log("EVENT", "session_deleted");
|
console.log("EVENT", "session_deleted");
|
||||||
resetApp();
|
reset();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
[onSessionConnected],
|
[onSessionConnected],
|
||||||
|
Loading…
Reference in New Issue
Block a user