Skip to content

Commit

Permalink
🐛 Address uppercase matching (#1201)
Browse files Browse the repository at this point in the history
  • Loading branch information
bal7hazar authored Dec 21, 2024
1 parent 69f5a1c commit 3b5ba91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/profile/src/hooks/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function useAccountInfo({ nameOrAddress }: { nameOrAddress: string }) {
// If the address matches a controller name, set the controller name
if (
nameOrAddress.match(/^[a-z0-9]+$/) &&
!nameOrAddress.replace("0x", "").match(/^[0-9a-f]+$/) &&
!nameOrAddress.replace("0x", "").match(/^[0-9a-fA-F]+$/) &&
nameOrAddress.length >= 3 &&
nameOrAddress.length <= 30
) {
Expand Down Expand Up @@ -87,7 +87,7 @@ export function useAccountInfo({ nameOrAddress }: { nameOrAddress: string }) {
}
if (
nameOrAddress.startsWith("0x") &&
nameOrAddress.replace("0x", "").match(/^[0-9a-f]+$/)
nameOrAddress.replace("0x", "").match(/^[0-9a-fA-F]+$/)
) {
return nameOrAddress;
}
Expand Down

0 comments on commit 3b5ba91

Please sign in to comment.