@macalinao/grill
Version:
Modern Solana development kit for React applications with automatic account batching, caching, and transaction notifications
14 lines • 440 B
JavaScript
import { useKitWallet } from "./use-kit-wallet.js";
/**
* Get the connected wallet, throwing an error if no wallet is connected.
* @throws Error if no wallet is connected.
* @returns The connected wallet.
*/
export const useConnectedWallet = () => {
const { signer } = useKitWallet();
if (!signer) {
throw new Error("Wallet is not connected");
}
return signer;
};
//# sourceMappingURL=use-connected-wallet.js.map