UNPKG

@vela-ventures/aosync-sdk-react

Version:
10 lines (9 loc) 283 B
import { useContext } from "react"; import { AOSyncContext } from "./walletContext"; export function useWallet() { const context = useContext(AOSyncContext); if (!context) { throw new Error("useWallet must be used within AoSyncProvider"); } return context; }