diff --git a/src/app/(authenticated)/dashboard/ai-assistants/[id]/page.tsx b/src/app/(authenticated)/dashboard/ai-assistants/[id]/page.tsx
index b6e73676b..992ecf86c 100644
--- a/src/app/(authenticated)/dashboard/ai-assistants/[id]/page.tsx
+++ b/src/app/(authenticated)/dashboard/ai-assistants/[id]/page.tsx
@@ -2,6 +2,7 @@ import EntityDetailPage from '@/components/entity/EntityDetailPage';
import { aiAssistantEntityConfig } from '@/config/entities/ai-assistants';
import type { AIAssistant } from '@/types/database';
import { capitalize, capitalizeWords } from '@/utils/string';
+import { displayBTC } from '@/services/currency/formatting';
interface PageProps {
params: Promise<{ id: string }>;
@@ -42,7 +43,7 @@ export default async function AIAssistantDetailPage({ params }: PageProps) {
if (assistant.price_per_message) {
left.push({
label: 'Price per Message',
- value: `${assistant.price_per_message?.toFixed(8) || '0'} BTC`,
+ value: displayBTC(assistant.price_per_message),
});
}
if (assistant.free_messages_per_day) {
diff --git a/src/app/(authenticated)/dashboard/research/[id]/page.tsx b/src/app/(authenticated)/dashboard/research/[id]/page.tsx
index 52d6b175e..c00cfd883 100644
--- a/src/app/(authenticated)/dashboard/research/[id]/page.tsx
+++ b/src/app/(authenticated)/dashboard/research/[id]/page.tsx
@@ -2,6 +2,7 @@ import EntityDetailPage from '@/components/entity/EntityDetailPage';
import { researchEntityConfig } from '@/config/entities/research';
import { ResearchEntity } from '@/types/research';
import { capitalize } from '@/utils/string';
+import { displayBTC } from '@/services/currency/formatting';
interface PageProps {
params: Promise<{ id: string }>;
@@ -45,9 +46,7 @@ export default async function ResearchDetailPage({ params }: PageProps) {
right.push({
label: 'Funding Raised',
- value: entity.funding_raised_btc
- ? `${Number(entity.funding_raised_btc).toFixed(8)} BTC`
- : '0 BTC',
+ value: displayBTC(entity.funding_raised_btc ? Number(entity.funding_raised_btc) : 0),
});
right.push({
diff --git a/src/app/(authenticated)/dashboard/wishlists/[id]/_components.tsx b/src/app/(authenticated)/dashboard/wishlists/[id]/_components.tsx
index e2e9beac2..d081a32b4 100644
--- a/src/app/(authenticated)/dashboard/wishlists/[id]/_components.tsx
+++ b/src/app/(authenticated)/dashboard/wishlists/[id]/_components.tsx
@@ -6,6 +6,7 @@ import { Badge } from '@/components/ui/badge';
import { Progress } from '@/components/ui/progress';
import { Button } from '@/components/ui/Button';
import { WISHLIST_TYPE_LABELS } from '@/config/wishlists';
+import { displayBTC } from '@/services/currency/formatting';
export interface WishlistWithStats {
id: string;
@@ -95,8 +96,8 @@ export function WishlistItemCard({
- {Number(item.funded_amount_btc).toFixed(8)} /{' '}
- {Number(item.target_amount_btc).toFixed(8)} BTC
+ {displayBTC(Number(item.funded_amount_btc))} /{' '}
+ {displayBTC(Number(item.target_amount_btc))}
)}
diff --git a/src/app/(authenticated)/dashboard/wishlists/[id]/page.tsx b/src/app/(authenticated)/dashboard/wishlists/[id]/page.tsx
index be965db1e..bc8443eb8 100644
--- a/src/app/(authenticated)/dashboard/wishlists/[id]/page.tsx
+++ b/src/app/(authenticated)/dashboard/wishlists/[id]/page.tsx
@@ -6,6 +6,7 @@ import { getOrCreateUserActor } from '@/services/actors/getOrCreateUserActor';
import { DATABASE_TABLES } from '@/config/database-tables';
import { ENTITY_REGISTRY } from '@/config/entity-registry';
import EntityDetailLayout from '@/components/entity/EntityDetailLayout';
+import { displayBTC } from '@/services/currency/formatting';
import { Button } from '@/components/ui/Button';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/Card';
import { Progress } from '@/components/ui/progress';
@@ -97,8 +98,8 @@ export default async function WishlistDetailPage({ params }: PageProps) {
- {Number(wishlist.total_funded_btc).toFixed(8)} BTC funded
- {Number(wishlist.total_target_btc).toFixed(8)} BTC total
+ {displayBTC(Number(wishlist.total_funded_btc))} funded
+ {displayBTC(Number(wishlist.total_target_btc))} total
diff --git a/src/app/wishlists/[id]/page.tsx b/src/app/wishlists/[id]/page.tsx
index 5f39da91c..8f6e9fbc5 100644
--- a/src/app/wishlists/[id]/page.tsx
+++ b/src/app/wishlists/[id]/page.tsx
@@ -8,6 +8,7 @@ import { fetchEntityOwner } from '@/lib/entities/fetchEntityOwner';
import { DATABASE_TABLES } from '@/config/database-tables';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/Card';
import { Badge } from '@/components/ui/badge';
+import { displayBTC } from '@/services/currency/formatting';
import { Progress } from '@/components/ui/progress';
import { Breadcrumb } from '@/components/ui/Breadcrumb';
import PublicEntityOwnerCard from '@/components/public/PublicEntityOwnerCard';
@@ -188,8 +189,8 @@ export default async function PublicWishlistPage({ params }: PageProps) {
- {totalFunded.toFixed(8)} BTC funded
- {totalTarget.toFixed(8)} BTC total
+ {displayBTC(totalFunded)} funded
+ {displayBTC(totalTarget)} total
@@ -246,8 +247,8 @@ export default async function PublicWishlistPage({ params }: PageProps) {
{item.target_amount_btc > 0 && (
- {item.funded_amount_btc.toFixed(8)} BTC
- {item.target_amount_btc.toFixed(8)} BTC goal
+ {displayBTC(item.funded_amount_btc)}
+ {displayBTC(item.target_amount_btc)} goal
diff --git a/src/components/ai-chat/AIChatMessage.tsx b/src/components/ai-chat/AIChatMessage.tsx
index 199defad8..cd4a58c05 100644
--- a/src/components/ai-chat/AIChatMessage.tsx
+++ b/src/components/ai-chat/AIChatMessage.tsx
@@ -4,6 +4,7 @@ import { cn } from '@/lib/utils';
import { Avatar, AvatarImage, AvatarFallback } from '@/components/ui/avatar';
import { Bot, User } from 'lucide-react';
import { formatShortTime } from '@/utils/dates';
+import { useDisplayCurrency } from '@/hooks/useDisplayCurrency';
interface AIMessage {
id: string;
@@ -31,6 +32,7 @@ export function AIChatMessage({
}: AIChatMessageProps) {
const isUser = message.role === 'user';
const isSystem = message.role === 'system';
+ const { formatAmountBtc } = useDisplayCurrency();
// Don't render system messages (they're context for the AI)
if (isSystem) {
@@ -71,7 +73,9 @@ export function AIChatMessage({
{message.content}
{!isUser && message.cost_btc && message.cost_btc > 0 && (
- Cost: {message.cost_btc.toFixed(8)} BTC
+
+ Cost: {formatAmountBtc(message.cost_btc)}
+
)}
diff --git a/src/components/profile/ProfileOverviewTab.tsx b/src/components/profile/ProfileOverviewTab.tsx
index 1e9392152..208224537 100644
--- a/src/components/profile/ProfileOverviewTab.tsx
+++ b/src/components/profile/ProfileOverviewTab.tsx
@@ -20,6 +20,7 @@ import { SocialLink } from '@/types/social';
import { ROUTES } from '@/config/routes';
import { ENTITY_REGISTRY } from '@/config/entity-registry';
import { toast } from 'sonner';
+import { useDisplayCurrency } from '@/hooks/useDisplayCurrency';
interface ProfileOverviewTabProps {
profile: ScalableProfile;
@@ -54,6 +55,7 @@ export default function ProfileOverviewTab({
}: ProfileOverviewTabProps) {
const isDashboardView = context === 'dashboard';
const publicContactEmail = profile.contact_email || profile.email;
+ const { formatAmountBtc } = useDisplayCurrency();
// State for support engines (design/esthetics + real flows for donate/sub/lend/invest)
const [supportType, setSupportType] = useState<'donate' | 'subscribe' | 'lend' | 'invest' | null>(
@@ -378,7 +380,7 @@ export default function ProfileOverviewTab({
- ₿{stats.totalRaised.toFixed(8)}
+ {formatAmountBtc(stats.totalRaised)}
Total Raised
diff --git a/src/components/wallets/WalletManager/components/WalletCard.tsx b/src/components/wallets/WalletManager/components/WalletCard.tsx
index f7888bb15..7a43c5d2a 100644
--- a/src/components/wallets/WalletManager/components/WalletCard.tsx
+++ b/src/components/wallets/WalletManager/components/WalletCard.tsx
@@ -9,6 +9,7 @@ import { WALLET_CATEGORIES } from '@/types/wallet';
import { WalletForm } from './WalletForm';
import type { WalletCardProps } from '../types';
import { truncateAddress } from '@/utils/string';
+import { displayBTC } from '@/services/currency/formatting';
export function WalletCard({
wallet,
@@ -140,7 +141,7 @@ export function WalletCard({
)}
- {wallet.balance_btc.toFixed(8)} BTC
+ {displayBTC(wallet.balance_btc)}
{wallet.balance_updated_at && (
@@ -155,7 +156,7 @@ export function WalletCard({
Goal
- {wallet.balance_btc.toFixed(4)} / {wallet.goal_amount} {wallet.goal_currency}
+ {displayBTC(wallet.balance_btc)} / {wallet.goal_amount} {wallet.goal_currency}