Skip to content

Instantly share code, notes, and snippets.

@avkos
Last active July 5, 2023 15:44
export const useSessionContext = () => useContext(SessionContext);
export const SessionProvider = ({children}: { children: any }) => {
const [wallet, setWallet] = useState<{address:string}>();
const [tokenList, setTokenList] = useState<ERC20Token[]>([]);
return <SessionContext.Provider value={{
wallet,
setWallet,
tokenList,
setTokenList,
}}>{children}</SessionContext.Provider>;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment