"use client"; import Link from "next/link"; import { useWallet } from "@/contexts/WalletContext"; import { useAccount } from "@/contexts/AccountContext"; import { isMerchantBtcConfigured } from "@/lib/merchantBtc"; type DepositWidgetProps = { compact?: boolean; }; export default function DepositWidget({ compact = false }: DepositWidgetProps) { const { usdStoreCredit, luxCredits } = useWallet(); const { user } = useAccount(); const btcReady = isMerchantBtcConfigured(); if (compact) { return (
Your balance
${usdStoreCredit.toFixed(2)} USD
{luxCredits.toLocaleString()} LUX
Deposit crypto →
{!user && (

Sign in to link deposits to your handle.

)} {!btcReady && (

Operator: set NEXT_PUBLIC_MERCHANT_BTC_ADDRESS in .env.local to enable deposits.

)}
); } return (
Account balance
${usdStoreCredit.toFixed(2)}
{luxCredits.toLocaleString()} LUX
Add crypto →
How it works
1. You send crypto to our receiving address.
2. We verify on-chain and credit your account at market USD rate.
3. You shop with USD credits. We hold the crypto and pay vendors on your behalf.
); }