feat: display truncated lightning address for winners
- Add truncateLightningAddress utility (shows first 2 chars + ******) - Backend: Include winner_address in past-wins API response - Frontend: Display truncated address in past winners list - Telegram: Add truncated address to draw announcements for transparency Example: username@blink.sv -> us******@blink.sv
This commit is contained in:
@@ -13,6 +13,7 @@ interface PastWin {
|
||||
pot_total_sats: number;
|
||||
pot_after_fee_sats: number | null;
|
||||
winner_name: string;
|
||||
winner_address: string | null;
|
||||
winning_ticket_serial: number | null;
|
||||
}
|
||||
|
||||
@@ -87,13 +88,19 @@ export default function PastWinsPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 text-sm">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 text-sm">
|
||||
<div>
|
||||
<div className="text-gray-400 mb-1">{STRINGS.pastWins.winner}</div>
|
||||
<div className="text-white font-semibold">
|
||||
{win.winner_name || 'Anon'}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-gray-400 mb-1">{STRINGS.pastWins.address}</div>
|
||||
<div className="text-white font-mono text-xs">
|
||||
{win.winner_address || 'N/A'}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-gray-400 mb-1">{STRINGS.pastWins.ticket}</div>
|
||||
<div className="text-white">
|
||||
|
||||
@@ -67,6 +67,7 @@ export const STRINGS = {
|
||||
description: 'Recent jackpots and their champions.',
|
||||
noWins: 'No completed jackpots yet. Check back soon!',
|
||||
winner: 'Winner',
|
||||
address: 'Lightning Address',
|
||||
ticket: 'Ticket #',
|
||||
pot: 'Pot',
|
||||
drawTime: 'Draw Time',
|
||||
|
||||
Reference in New Issue
Block a user