Problem: List view was the default Fix: Changed default to bubble map view
// Before
const [viewMode, setViewMode] = useState<'list' | 'map'>('list');
// After
const [viewMode, setViewMode] = useState<'list' | 'map'>('map'); // Default to bubble mapProblem: Custom wallet labels weren't displayed in bubble map Fix: Added lookup from storage and prioritized labels
// Get label from storage or use provided label
const walletLabel = storageUtils.getWalletLabel(node.address) || node.label;
// Display label prominently
<div className="font-bold text-sm">{walletLabel || shortAddr}</div>
{walletLabel && <div className="text-xs text-gray-400 mt-1">{shortAddr}</div>}Now shows:
- If you labeled a wallet: Shows the label (bold) + address (small)
- If no label: Shows shortened address
Problem: Arrows pointed from seller to origin (backwards) Fix: Reversed arrow direction to show token flow from origin to seller
// Before (wrong)
source: currentId, // Seller
target: parentId, // Origin
// Arrow: Seller → Origin (backwards!)
// After (correct)
source: parentId, // Origin
target: currentId, // Seller
// Arrow: Origin → Seller (correct!)Now shows correct flow:
DEX Pool → Intermediate Wallet → Seller
(Origin) (Current)
Problem: No way to view transaction on block explorer from bubble map Fix: Added "View TX" link to each bubble
<a
href={`https://basescan.org/tx/${node.transaction}`}
target="_blank"
rel="noopener noreferrer"
className="text-xs text-blue-400 hover:text-blue-300 mt-1 inline-flex items-center gap-1"
onClick={(e) => e.stopPropagation()}
>
View TX <ExternalLink size={10} />
</a>Features:
- Opens in new tab
- Stops event propagation (doesn't interfere with node dragging)
- Styled to match the UI
- Shows external link icon
[Bubble]
0x1234...5678
100 tokens
[Bubble]
My Wallet Label ← Custom label (if set)
0x1234...5678 ← Address (smaller)
100 tokens
🔵 DEX Pool ← Origin type (if origin)
View TX 🔗 ← Link to block explorer
The bubble map now has:
- ✅ Default view - Opens automatically
- ✅ Custom labels - Shows your wallet labels
- ✅ Correct arrows - Origin → Seller direction
- ✅ View TX links - Direct links to Basescan
- ✅ Interactive - Drag, zoom, pan
- ✅ Color-coded - Different colors for origin types
- ✅ Bubble sizes - Based on token amounts
- ✅ Legend - Explains colors and controls
- ✅ MiniMap - Overview of entire trace
-
Add wallet labels (optional):
- Click "Wallet Labels" button
- Add labels for addresses you want to track
- Labels will appear in bubble map
-
Analyze transaction:
- Enter transaction hash and token address
- Click "Start Analysis"
- Bubble map opens automatically
-
Interact with map:
- Drag - Pan around the map
- Scroll - Zoom in/out
- Click bubble - Select node
- Click "View TX" - Open in Basescan
- Use controls - Zoom buttons, fit view
-
Switch views:
- Click "List View" for traditional expandable list
- Click "Bubble Map" to return to visualization
Transaction Analysis:
User sells 1000 tokens
Bubble Map Shows:
┌─────────────────────────────────────────────────────────┐
│ │
│ [🔵 DEX Pool] → [Intermediate] → [My Wallet] │
│ Origin Wallet Seller │
│ 1000 tokens 1000 tokens 1000 tokens │
│ View TX 🔗 View TX 🔗 View TX 🔗 │
│ │
└─────────────────────────────────────────────────────────┘
Arrow Direction: Origin → Intermediate → Seller
(Shows where tokens came from)
- Visual clarity - See entire token flow at a glance
- Custom labels - Identify important wallets easily
- Correct flow - Arrows show true token movement
- Quick access - View any transaction with one click
- Professional - Looks like a real blockchain explorer
- Custom label from storage (highest priority)
- Label from trace node
- Shortened address (fallback)
- Source: Where tokens came from (origin/parent)
- Target: Where tokens went to (current wallet)
- Direction: Always origin → seller
- Uses Basescan for Base network
- Transaction hash from trace node
- Opens in new tab
- Prevents event bubbling
The bubble map is now a fully-featured, professional visualization tool that:
- Shows correct token flow
- Displays custom labels
- Provides direct blockchain explorer access
- Works as the default view
Perfect for analyzing token origins visually!