UNPKG

@web3auth/modal

Version:

Multi chain wallet aggregator for web3Auth

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