UNPKG

@web3auth/modal

Version:

Multi chain wallet aggregator for web3Auth

12 lines (9 loc) 482 B
import { WalletInitializationError } from '@web3auth/no-modal'; import { useContext } from 'react'; import { WalletServicesContext } from '../context/WalletServicesInnerContext.js'; const useWalletServicesPlugin = () => { const context = useContext(WalletServicesContext); if (!context) throw WalletInitializationError.fromCode(1000, "usage of useWalletServicesPlugin not wrapped in `WalletServicesContextProvider`."); return context; }; export { useWalletServicesPlugin };