UNPKG

@web3auth/no-modal

Version:
12 lines (9 loc) 454 B
import { inject } from 'vue'; import { Web3AuthContextKey } from '../../base/composables/index.js'; import { WalletInitializationError } from '../../base/errors/index.js'; function useInjectedWeb3AuthInnerContext() { const context = inject(Web3AuthContextKey); if (!context) throw WalletInitializationError.fromCode(1000, "usage of `useWeb3Auth` not wrapped in `Web3AuthProvider`."); return context; } export { useInjectedWeb3AuthInnerContext };