@@ -43,6 +43,7 @@ interface UserWallet {
4343 id : string ;
4444 email : string ;
4545 name ?: string ;
46+ username ?: string ;
4647 wallet_address : string ;
4748 blockchain : string ;
4849}
@@ -181,7 +182,7 @@ export function RecipientSearchInput({
181182 const { data : walletsWithProfiles , error } = await supabase
182183 . from ( 'wallets' )
183184 . select (
184- 'wallet_address, blockchain, profile_id, profiles(id, auth_user_id, name, email)'
185+ 'wallet_address, blockchain, profile_id, profiles(id, auth_user_id, name, email, username )'
185186 )
186187 . in ( 'blockchain' , [ 'ARC' , 'ARC-TESTNET' ] ) ;
187188
@@ -198,6 +199,8 @@ export function RecipientSearchInput({
198199 return (
199200 ( profile . name &&
200201 profile . name . toLowerCase ( ) . includes ( queryLower ) ) ||
202+ ( profile . username &&
203+ profile . username . toLowerCase ( ) . includes ( queryLower ) ) ||
201204 ( profile . email &&
202205 profile . email . toLowerCase ( ) . includes ( queryLower ) ) ||
203206 ( w . wallet_address &&
@@ -210,6 +213,7 @@ export function RecipientSearchInput({
210213 id : profile . id ,
211214 email : profile . email ,
212215 name : profile . name ,
216+ username : profile . username ,
213217 wallet_address : w . wallet_address ,
214218 blockchain : w . blockchain ,
215219 } ;
@@ -381,7 +385,7 @@ export function RecipientSearchInput({
381385 </ Button >
382386 < div className = "flex-1 **:[[cmdk-input-wrapper]]:border-0" >
383387 < CommandInput
384- placeholder = "Name, email, or wallet address..."
388+ placeholder = "Name, username, email, or address..."
385389 value = { searchQuery }
386390 onValueChange = { setSearchQuery }
387391 />
@@ -434,7 +438,7 @@ export function RecipientSearchInput({
434438 < div className = "flex flex-col items-center gap-2 text-muted-foreground" >
435439 < UserX className = "h-10 w-10 opacity-40" />
436440 < p className = "text-sm font-medium" > No users found</ p >
437- < p className = "text-xs" > Try a different name, email, or wallet address</ p >
441+ < p className = "text-xs" > Try a different name, username, email, or address</ p >
438442 </ div >
439443 </ CommandEmpty >
440444 ) }
@@ -480,7 +484,7 @@ export function RecipientSearchInput({
480484 { user . name || user . email }
481485 </ p >
482486 < p className = "text-xs text-muted-foreground" >
483- { truncateAddress ( user . wallet_address ) }
487+ { user . username ? `@ ${ user . username } · ` : '' } { truncateAddress ( user . wallet_address ) }
484488 </ p >
485489 </ div >
486490 </ CommandItem >
0 commit comments