refactor(dapp-v2): rename resetApp -> reset

This commit is contained in:
Ben Kremer 2022-03-17 15:02:23 +01:00
parent 112465b5c7
commit c4759249b6

View File

@ -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],