Skip to content

Commit

Permalink
update with prettier fix: validate hex address and prevent multiple 0…
Browse files Browse the repository at this point in the history
…x in Address.tsx
  • Loading branch information
KevinMB0220 committed Dec 23, 2024
1 parent b93b0c8 commit fe3b7bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nextjs/components/scaffold-stark/Address.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ export const Address = ({
if (value.toLowerCase() === "0x") {
value = "0x0";
}

if (value.toLowerCase() === "0x0x0") {
return false;
}

const hexAddressRegex = /^0x[0-9a-fA-F]+$/;
return hexAddressRegex.test(value);
};
Expand Down

0 comments on commit fe3b7bf

Please sign in to comment.