Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default defineConfig([
rules: {
...nextConfig.rules,
"react-hooks/exhaustive-deps": "warn",
"react-hooks/refs": "off",
"react-hooks/set-state-in-effect": "off",
"react-hooks/immutability": "off",
"react-hooks/preserve-manual-memoization": "off",
Expand Down
3,075 changes: 1,164 additions & 1,911 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/app/(app)/address/[address]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from '@/components/ui/table';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { ArrowLeft, Bitcoin, AlertCircle, ArrowUpRight, ArrowDownLeft, ArrowLeftRight } from 'lucide-react';
import { ArrowLeft, Bitcoin, CircleAlert, ArrowUpRight, ArrowDownLeft, ArrowLeftRight } from 'lucide-react';
import { useWallet } from '@/contexts/wallet-context';
import { FullPageLoader, ErrorDisplay } from '@/components/ui/loader';
import { cn } from '@/lib/utils';
Expand Down Expand Up @@ -165,7 +165,7 @@ export default function AddressDetailsPage() {
if (pageError) {
return (
<div className="flex flex-col items-center justify-center gap-4 text-center">
<AlertCircle className="h-12 w-12 text-destructive" />
<CircleAlert className="h-12 w-12 text-destructive" />
<h1 className="text-2xl font-bold">Address Not Found</h1>
<p className="text-muted-foreground">{pageError}</p>
<Button asChild onClick={() => router.back()}>
Expand Down
8 changes: 4 additions & 4 deletions src/app/(app)/analysis/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
CardDescription,
} from '@/components/ui/card';
import { IconContainer } from '@/components/ui/icon-container';
import { PieChart, DollarSign, Activity, BarChart3, Loader2, Coins } from 'lucide-react';
import { ChartPie, DollarSign, Activity, ChartColumn, LoaderCircle, Coins } from 'lucide-react';
import {
ChartContainer,
ChartTooltipContent,
Expand Down Expand Up @@ -233,7 +233,7 @@ export default function AnalysisPage() {
{isDiscovering && discoveryProgress && (
<div className="bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-950/30 dark:to-purple-950/30 border-2 border-blue-200 dark:border-blue-800 rounded-lg px-4 py-3 shadow-md">
<div className="flex items-start gap-3">
<Loader2 className="h-5 w-5 animate-spin text-blue-600 dark:text-blue-400 mt-0.5 flex-shrink-0" />
<LoaderCircle className="h-5 w-5 animate-spin text-blue-600 dark:text-blue-400 mt-0.5 flex-shrink-0" />
<div className="flex-1 space-y-2">
<div className="flex items-center justify-between">
<p className="text-sm font-semibold text-blue-900 dark:text-blue-100">
Expand Down Expand Up @@ -325,7 +325,7 @@ export default function AnalysisPage() {
<CardHeader className="bg-gradient-to-br from-emerald-500/5 via-transparent to-transparent border-b">
<CardTitle className="text-base sm:text-lg flex items-center gap-2">
<IconContainer variant="emerald">
<BarChart3 className="h-5 w-5" />
<ChartColumn className="h-5 w-5" />
</IconContainer>
Monthly Volume
</CardTitle>
Expand Down Expand Up @@ -363,7 +363,7 @@ export default function AnalysisPage() {
<CardHeader className="bg-gradient-to-br from-orange-500/5 via-transparent to-transparent border-b">
<CardTitle className="text-base sm:text-lg flex items-center gap-2">
<IconContainer variant="orange">
<PieChart className="h-5 w-5" />
<ChartPie className="h-5 w-5" />
</IconContainer>
UTXO Distribution
</CardTitle>
Expand Down
8 changes: 4 additions & 4 deletions src/app/(app)/block/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from '@/components/ui/table';
import { Button } from '@/components/ui/button';
import { IconContainer } from '@/components/ui/icon-container';
import { ArrowLeft, AlertCircle, Copy, Box, Download, Loader2 } from 'lucide-react';
import { ArrowLeft, CircleAlert, Copy, Box, Download, LoaderCircle } from 'lucide-react';
import { FullPageLoader, ErrorDisplay } from '@/components/ui/loader';
import { useToast } from '@/hooks/use-toast';
import type { BlockDetails, BlockTransaction } from '@/lib/types';
Expand Down Expand Up @@ -111,7 +111,7 @@ export default function BlockDetailsPage() {
if (pageError) {
return (
<div className="flex flex-col items-center justify-center gap-4 text-center">
<AlertCircle className="h-12 w-12 text-destructive" />
<CircleAlert className="h-12 w-12 text-destructive" />
<h1 className="text-2xl font-bold">Block Not Found</h1>
<p className="text-muted-foreground">{pageError}</p>
<Button onClick={() => router.back()}>
Expand Down Expand Up @@ -161,7 +161,7 @@ export default function BlockDetailsPage() {
<CardHeader className="bg-gradient-to-br from-blue-500/5 via-transparent to-transparent border-b">
<CardTitle className="text-base sm:text-lg flex items-center gap-2">
<IconContainer variant="blue">
<AlertCircle className="h-5 w-5" />
<CircleAlert className="h-5 w-5" />
</IconContainer>
Block Details
</CardTitle>
Expand Down Expand Up @@ -223,7 +223,7 @@ export default function BlockDetailsPage() {
{hasMoreTxs && (
<div className="mt-6 flex justify-center">
<Button onClick={loadMoreTxs} variant="outline" disabled={isLoadingMore}>
{isLoadingMore ? <Loader2 className="mr-2 h-4 w-4 animate-spin" /> : <Download className="mr-2 h-4 w-4" />}
{isLoadingMore ? <LoaderCircle className="mr-2 h-4 w-4 animate-spin" /> : <Download className="mr-2 h-4 w-4" />}
Load More Transactions
</Button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/app/(app)/chat/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useState, useRef, useEffect, useCallback } from 'react';
import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { z } from 'zod';
import { SendHorizonal, Bot, User, CircleDashed, Mic, AlertTriangle } from 'lucide-react';
import { SendHorizontal, Bot, User, CircleDashed, Mic, AlertTriangle } from 'lucide-react';
import ReactMarkdown from 'react-markdown';
import { streamFlow } from '@genkit-ai/next/client';

Expand Down Expand Up @@ -632,7 +632,7 @@ export default function ChatPage() {
<Mic className="h-4 w-4 sm:h-5 sm:w-5" />
</Button>
<Button type="submit" size="icon" disabled={isAiLoading} aria-label="Send message" className="h-10 w-10 sm:h-10 sm:w-10 shadow-md hover:shadow-lg transition-shadow">
<SendHorizonal className="h-4 w-4 sm:h-5 sm:w-5" />
<SendHorizontal className="h-4 w-4 sm:h-5 sm:w-5" />
</Button>
</form>
</Form>
Expand Down
6 changes: 3 additions & 3 deletions src/app/(app)/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use client';

import Link from 'next/link';
import { ArrowRight, Bitcoin, ShieldCheck, TrendingUp, TrendingDown, ArrowUpCircle, ArrowDownCircle, ArrowUpRight, ArrowDownLeft, Activity, RefreshCw } from 'lucide-react';
import { ArrowRight, Bitcoin, ShieldCheck, TrendingUp, TrendingDown, CircleArrowUp, CircleArrowDown, ArrowUpRight, ArrowDownLeft, Activity, RefreshCw } from 'lucide-react';
import {
Card,
CardContent,
Expand Down Expand Up @@ -260,14 +260,14 @@ export default function DashboardPage() {
</CardHeader>
<CardContent className="space-y-2 sm:space-y-3 pt-1">
<div className="flex items-center gap-2 sm:gap-3">
<ArrowUpCircle className="h-5 w-5 sm:h-6 sm:w-6 text-emerald-500 shrink-0" />
<CircleArrowUp className="h-5 w-5 sm:h-6 sm:w-6 text-emerald-500 shrink-0" />
<div>
<p className="text-xs text-muted-foreground font-normal">Inflow</p>
<p className="font-bold text-sm">{data.inflowOutflow.inflowBTC.toFixed(6)} BTC</p>
</div>
</div>
<div className="flex items-center gap-2 sm:gap-3">
<ArrowDownCircle className="h-5 w-5 sm:h-6 sm:w-6 text-rose-500 shrink-0" />
<CircleArrowDown className="h-5 w-5 sm:h-6 sm:w-6 text-rose-500 shrink-0" />
<div>
<p className="text-xs text-muted-foreground font-normal">Outflow</p>
<p className="font-bold text-sm">{Math.abs(data.inflowOutflow.outflowBTC).toFixed(6)} BTC</p>
Expand Down
8 changes: 4 additions & 4 deletions src/app/(app)/discover/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/com
import { ExplorerNode } from '@/components/ui/explorer-node';
import { IconContainer } from '@/components/ui/icon-container';
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs';
import { Network, Loader2, AlertCircle, GitGraph, ListTree } from 'lucide-react';
import { Network, LoaderCircle, CircleAlert, GitGraph, ListTree } from 'lucide-react';
import { getAddressData, getTransactionData, getAddressStats } from '@/lib/blockchain-api';
import type { AddressInfo, Transaction } from '@/lib/types';
import dynamic from 'next/dynamic';
Expand Down Expand Up @@ -366,7 +366,7 @@ export default function DiscoverPage() {
<CardHeader className="bg-gradient-to-br from-blue-500/5 via-transparent to-transparent border-b">
<CardTitle className="flex items-center gap-2">
<IconContainer variant="blue">
<AlertCircle className="h-5 w-5" />
<CircleAlert className="h-5 w-5" />
</IconContainer>
Forensic Legend
</CardTitle>
Expand Down Expand Up @@ -432,7 +432,7 @@ export default function DiscoverPage() {
<CardContent className="relative h-[600px] rounded-lg border bg-card-foreground/5 p-0 overflow-hidden">
{graphError ? (
<div className="flex h-full flex-col items-center justify-center gap-4 text-center">
<AlertCircle className="h-12 w-12 text-destructive" />
<CircleAlert className="h-12 w-12 text-destructive" />
<h1 className="text-2xl font-bold">Graph Error</h1>
<p className="text-muted-foreground">{graphError}</p>
</div>
Expand Down Expand Up @@ -467,7 +467,7 @@ export default function DiscoverPage() {
/>
{isLoadingGraph && (
<div className="absolute bottom-4 right-4 flex items-center gap-2 rounded-full bg-background/80 p-2 pr-3 text-sm text-muted-foreground backdrop-blur-sm">
<Loader2 className="h-4 w-4 animate-spin" />
<LoaderCircle className="h-4 w-4 animate-spin" />
<span>Loading graph data...</span>
</div>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/app/(app)/feedback/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useState } from 'react';
import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { z } from 'zod';
import { SendHorizonal, ThumbsUp, CircleDashed, Copy, Zap } from 'lucide-react';
import { SendHorizontal, ThumbsUp, CircleDashed, Copy, Zap } from 'lucide-react';
import Image from 'next/image';

import { Button } from '@/components/ui/button';
Expand Down Expand Up @@ -173,7 +173,7 @@ export default function FeedbackPage() {
</>
) : (
<>
<SendHorizonal className="mr-2" />
<SendHorizontal className="mr-2" />
Send Feedback
</>
)}
Expand Down
12 changes: 6 additions & 6 deletions src/app/(app)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import * as React from 'react';
import Link from 'next/link';
import { usePathname, useRouter } from 'next/navigation';
import { ArrowLeftRight, LayoutDashboard, MessageCircle, Shield, Bitcoin, LineChart, Star, Terminal, Pencil, ChevronsUpDown, PlusCircle, Check, X, Loader2, Compass, Layers, CandlestickChart, FileSpreadsheet, Coins } from 'lucide-react';
import { ArrowLeftRight, LayoutDashboard, MessageCircle, Shield, Bitcoin, ChartLine, Star, Terminal, Pencil, ChevronsUpDown, CirclePlus, Check, X, LoaderCircle, Compass, Layers, ChartCandlestick, FileSpreadsheet, Coins } from 'lucide-react';
import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import * as z from 'zod';
Expand Down Expand Up @@ -46,13 +46,13 @@ import { logger } from '@/lib/logger';
const navItems = [
{ href: '/dashboard', icon: LayoutDashboard, label: 'Dashboard', description: "Get a high-level overview of your wallet's balance, security, and recent activity." },
{ href: '/transactions', icon: ArrowLeftRight, label: 'Transactions', description: "View a complete list of all your incoming and outgoing transactions." },
{ href: '/analysis', icon: LineChart, label: 'Analysis', description: "Visualize your wallet's data with charts for balance history, transaction volume, and more." },
{ href: '/analysis', icon: ChartLine, label: 'Analysis', description: "Visualize your wallet's data with charts for balance history, transaction volume, and more." },
{ href: '/security', icon: Shield, label: 'Security', description: "Analyze your wallet's privacy practices, see security recommendations, and check for address reuse." },
{ href: '/report', icon: FileSpreadsheet, label: 'Report', description: "Generate financial reports for tax summary, profit & loss, and performance analysis." },
{ href: '/coin-control', icon: Coins, label: 'Coin Control', description: "Manage your UTXOs to optimize transaction fees and privacy." },
{ href: '/discover', icon: Compass, label: 'Discover', description: "Explore any Bitcoin address or transaction on the blockchain with an interactive graph." },
{ href: '/mempool', icon: Layers, label: 'Mempool', description: "See real-time data from the Bitcoin mempool, including fees and pending blocks." },
{ href: '/market', icon: CandlestickChart, label: 'Market', description: "Track the latest Bitcoin price, market stats, and the Fear & Greed Index." },
{ href: '/market', icon: ChartCandlestick, label: 'Market', description: "Track the latest Bitcoin price, market stats, and the Fear & Greed Index." },
{ href: '/chat', icon: MessageCircle, label: 'AI Chat', description: "Ask our AI assistant anything about your wallet or Bitcoin in general." },
{ href: '/feedback', icon: Star, label: 'Feedback', description: "Share your thoughts and suggestions to help us improve BitSleuth." },
];
Expand Down Expand Up @@ -135,7 +135,7 @@ function AddAccountDialog({ open, onOpenChange }: { open: boolean, onOpenChange:
/>
<DialogFooter>
<Button type="submit" disabled={isSubmitting}>
{isSubmitting && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
{isSubmitting && <LoaderCircle className="mr-2 h-4 w-4 animate-spin" />}
{isSubmitting ? 'Connecting...' : 'Add XPUB Key'}
</Button>
</DialogFooter>
Expand Down Expand Up @@ -266,7 +266,7 @@ function AccountSwitcher() {
className="w-full"
onClick={handleAddWalletClick}
>
<PlusCircle className="mr-2 h-4 w-4" />
<CirclePlus className="mr-2 h-4 w-4" />
Add XPUB Key
</Button>
</div>
Expand Down Expand Up @@ -648,7 +648,7 @@ function AppLayoutInner({ children }: { children: React.ReactNode }) {
onClick={() => setNostrDialogOpen(true)}
disabled={!isNostrReady}
>
{isNostrReady ? 'Connect Account' : <Loader2 className="h-3 w-3 animate-spin"/>}
{isNostrReady ? 'Connect Account' : <LoaderCircle className="h-3 w-3 animate-spin"/>}
</Button>
</div>
)}
Expand Down
14 changes: 7 additions & 7 deletions src/app/(app)/report/enhanced-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
import { Button } from '@/components/ui/button';
import { DateRange } from 'react-day-picker';
import { format, subMonths, startOfYear, endOfYear, getYear } from 'date-fns';
import { Calendar as CalendarIcon, Info, TrendingUp, TrendingDown, Bitcoin as BitcoinIcon, AlertTriangle, CheckCircle2, FileText, Download, Package, FileOutput, Edit2 } from 'lucide-react';
import { Calendar as CalendarIcon, Info, TrendingUp, TrendingDown, Bitcoin as BitcoinIcon, AlertTriangle, CircleCheck, FileText, Download, Package, FileOutput, Pen } from 'lucide-react';

import { useWallet } from '@/contexts/wallet-context';
import {
Expand Down Expand Up @@ -494,7 +494,7 @@ export default function EnhancedReportPage() {
<CardHeader className="bg-emerald-500/5 border-b">
<CardTitle className="flex items-center gap-2 text-lg">
<IconContainer variant="emerald">
<CheckCircle2 className="h-4 w-4 text-emerald-600 dark:text-emerald-400" />
<CircleCheck className="h-4 w-4 text-emerald-600 dark:text-emerald-400" />
</IconContainer>
Calculation Methodology
</CardTitle>
Expand Down Expand Up @@ -746,7 +746,7 @@ export default function EnhancedReportPage() {
<CardContent>
{reportData.disposals.length === 0 ? (
<Alert>
<CheckCircle2 className="h-4 w-4" />
<CircleCheck className="h-4 w-4" />
<AlertTitle>No Disposals</AlertTitle>
<AlertDescription>
No taxable disposal events occurred during this reporting period.
Expand Down Expand Up @@ -799,7 +799,7 @@ export default function EnhancedReportPage() {
className="hover:bg-primary/10"
onClick={() => handleEditTransactionCategory(disposal.txid, 'disposal', disposal.type)}
>
<Edit2 className="h-4 w-4" />
<Pen className="h-4 w-4" />
</Button>
</TableCell>
</TableRow>
Expand Down Expand Up @@ -856,7 +856,7 @@ export default function EnhancedReportPage() {
size="sm"
onClick={() => handleEditTransactionCategory(income.txid, 'income', income.type)}
>
<Edit2 className="h-4 w-4" />
<Pen className="h-4 w-4" />
</Button>
</TableCell>
</TableRow>
Expand Down Expand Up @@ -966,7 +966,7 @@ export default function EnhancedReportPage() {
<CardContent>
{reportData.lots.filter(lot => lot.unrealizedGain < 0).length === 0 ? (
<Alert>
<CheckCircle2 className="h-4 w-4" />
<CircleCheck className="h-4 w-4" />
<AlertTitle>No Losses to Harvest</AlertTitle>
<AlertDescription>
All your tax lots currently have unrealized gains. There are no losses available to harvest.
Expand Down Expand Up @@ -1027,7 +1027,7 @@ export default function EnhancedReportPage() {
<CardHeader className="border-b bg-gradient-to-r from-emerald-500/5 to-transparent">
<CardTitle className="flex items-center gap-2">
<div className="p-2 rounded-lg bg-emerald-500/10">
<CheckCircle2 className="h-4 w-4 text-emerald-600 dark:text-emerald-400" />
<CircleCheck className="h-4 w-4 text-emerald-600 dark:text-emerald-400" />
</div>
Optimization Strategies
</CardTitle>
Expand Down
Loading
Loading