move files together

This commit is contained in:
lemonknowsall committed 2025-10-13 19:57:15 -07:00
1 parent 5ce402105c
commit aaf12120e6
11 files changed
+32 -41

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ import { Badge } from '@/components/ui/badge';
import { Separator } from '@/components/ui/separator';
import { useNWC } from '@/hooks/useNWCContext';
import { useWallet } from '@/hooks/useWallet';
import { useCashu } from '@/hooks/useCashu';
import { useCashu } from '@/hooks/cashu/useCashu';
import { useToast } from '@/hooks/useToast';
import { useIsMobile } from '@/hooks/useIsMobile';
import type { NWCConnection, NWCInfo } from '@/hooks/useNWC';
+1 -1
View File
@@ -30,7 +30,7 @@ import { useAuthor } from '@/hooks/useAuthor';
import { useToast } from '@/hooks/useToast';
import { useZaps } from '@/hooks/useZaps';
import { useWallet } from '@/hooks/useWallet';
import { useCashu } from '@/hooks/useCashu';
import { useCashu } from '@/hooks/cashu/useCashu';
import { useIsMobile } from '@/hooks/useIsMobile';
import type { Event } from 'nostr-tools';
import QRCode from 'qrcode';
+1 -1
View File
@@ -30,7 +30,7 @@ import { useAuthor } from '@/hooks/useAuthor';
import { useToast } from '@/hooks/useToast';
import { useZaps } from '@/hooks/useZaps';
import { useWallet } from '@/hooks/useWallet';
import { useCashu } from '@/hooks/useCashu';
import { useCashu } from '@/hooks/cashu/useCashu';
import { useIsMobile } from '@/hooks/useIsMobile';
import type { Event } from 'nostr-tools';
import QRCode from 'qrcode';
@@ -1,21 +1,20 @@
import { useState, useEffect, useCallback, useRef } from 'react';
import { nip19 } from 'nostr-tools';
import { useCashu, type HistoryEntry } from '@/hooks/useCashu';
import { useCashu, type HistoryEntry } from '@/hooks/cashu/useCashu';
import { useLightningAddress } from '@/hooks/useLightningAddress';
import { getCleanMintLabel } from '@/lib/cashuUtils';
import { useNpubCash, type NpubCashUserInfo } from '@/hooks/useNpubCash';
import { useCurrentUser } from '@/hooks/useCurrentUser';
import { useToast } from '@/hooks/useToast';
import { useQRCode } from '@/hooks/useQRCode';
import { useCopyToClipboard } from '@/hooks/useCopyToClipboard';
import { QRModal } from '@/components/ui/qr-modal';
import { LoadingModal } from '@/components/wallet/LoadingModal';
import { BalanceDisplay } from '@/components/wallet/BalanceDisplay';
import { ReceiveCard } from '@/components/wallet/ReceiveCard';
import { SendCard } from '@/components/wallet/SendCard';
import { TransactionHistory } from '@/components/wallet/TransactionHistory';
import { ProofBreakdownModal } from '@/components/wallet/ProofBreakdownModal';
import { RemoveMintModal } from '@/components/wallet/RemoveMintModal';
import { LoadingModal } from './LoadingModal';
import { BalanceDisplay } from './BalanceDisplay';
import { ReceiveCard } from './ReceiveCard';
import { SendCard } from './SendCard';
import { TransactionHistory } from './TransactionHistory';
import { ProofBreakdownModal } from './ProofBreakdownModal';
import { RemoveMintModal } from './RemoveMintModal';
import { LoginArea } from '@/components/auth/LoginArea';
export function CashuWallet() {
@@ -133,7 +132,7 @@ export function CashuWallet() {
const totalBalance: number = (Object.values(balances) as number[]).reduce((sum: number, balance: number) => sum + balance, 0);
// ============================================================================
// HELPER FUNCTIONS - QR Code Generation
// HELPER FUNCTIONS - QR Code Generation & Formatting
// ============================================================================
// Generate QR code for sent token
@@ -146,6 +145,18 @@ export function CashuWallet() {
}
};
// Get clean mint label for display
const getCleanMintLabel = useCallback((mint: { name?: string; url: string }): string => {
if (mint.name && mint.name.trim().length > 0) {
return mint.name.replace(/^https?:\/\//, '');
}
try {
return new URL(mint.url).host;
} catch {
return mint.url.replace(/^https?:\/\//, '');
}
}, []);
// ============================================================================
// HELPER FUNCTIONS - Mint Management
// ============================================================================
@@ -807,3 +818,4 @@ export function CashuWallet() {
</>
);
}
+1 -1
View File
@@ -2,7 +2,7 @@ import { Button } from '@/components/ui/button';
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
import { Badge } from '@/components/ui/badge';
import { Loader2, History, ArrowUpRight, ArrowDownLeft, Zap, ChevronDown, ChevronUp, Coins } from 'lucide-react';
import type { HistoryEntry } from '@/hooks/useCashu';
import type { HistoryEntry } from '@/hooks/cashu/useCashu';
interface TransactionHistoryProps {
entries: HistoryEntry[];