UNPKG

@coin-voyage/paykit

Version:

Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.

22 lines 930 B
import { jsx as _jsx } from "react/jsx-runtime"; import { BigmiContext } from "@bigmi/react"; import { UTXOBaseProvider } from "@coin-voyage/crypto/utxo/base-provider"; import { UTXOExternalContext } from "@coin-voyage/crypto/utxo/external-context"; import { useContext } from "react"; import { useAppContext } from "../../components/contexts/app/index"; export function useInBigmiContext() { try { const context = useContext(BigmiContext); return Boolean(context); } catch { return false; } } export function UTXOProvider({ children }) { const inBigmiContext = useInBigmiContext(); const { walletConfig } = useAppContext(); const config = walletConfig?.utxo; return inBigmiContext ? (_jsx(UTXOExternalContext.Provider, { value: inBigmiContext, children: children })) : (_jsx(UTXOBaseProvider, { config: config, children: children })); } //# sourceMappingURL=provider.js.map