UNPKG

@web3auth/no-modal

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