Skip to content

Commit 1698907

Browse files
Enhance recipient search and revert dependency updates (#8)
1 parent 35d264c commit 1698907

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

components/recipient-search.input.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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>

supabase/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# https://supabase.com/docs/guides/local-development/cli/config
1919
# A string used to distinguish different Supabase projects on the same host. Defaults to the
2020
# working directory name when running `supabase init`.
21-
project_id = "coinapp-mobile-web"
21+
project_id = "arc-p2p-payments"
2222

2323
[api]
2424
enabled = true

0 commit comments

Comments
 (0)