From 2a3da97b49e50316670594df4638fb3d6edec215 Mon Sep 17 00:00:00 2001
From: Claude
Date: Sun, 18 Jan 2026 22:05:36 +0000
Subject: [PATCH] refactor: replace blur with fixed-width placeholders for
privacy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Prevent balance size information leakage by using fixed-width
placeholder characters instead of blur effect. A blurred "1000000"
would still reveal it's a large balance vs "100" even when blurred.
Changes:
- Replace blur-sm class with conditional placeholder text
- Use "••••••" for main balances
- Use "••••" for transaction amounts in lists
- Use "•••••• sats" for detailed amounts with unit
- Use "•••• sats" for smaller amounts like fees
Security improvement: No information about balance size is leaked
when privacy mode is enabled. All hidden amounts appear identical.
---
src/components/WalletViewer.tsx | 45 +++++++++++++++---------------
src/components/nostr/user-menu.tsx | 16 +++++------
2 files changed, 30 insertions(+), 31 deletions(-)
diff --git a/src/components/WalletViewer.tsx b/src/components/WalletViewer.tsx
index 2d37ad2..66325d5 100644
--- a/src/components/WalletViewer.tsx
+++ b/src/components/WalletViewer.tsx
@@ -1064,8 +1064,8 @@ export default function WalletViewer() {
className="text-4xl font-bold font-mono hover:opacity-70 transition-opacity cursor-pointer flex items-center gap-3"
title="Click to toggle privacy blur"
>
-
- {formatSats(balance)}
+
+ {state.walletBalancesBlurred ? "••••••" : formatSats(balance)}
{state.walletBalancesBlurred ? (
@@ -1161,10 +1161,10 @@ export default function WalletViewer() {