Skip to content

Commit

Permalink
fix: updated is address format util fn to check for 43 length
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaswma committed Jul 16, 2024
1 parent 356cdaa commit 8f5fe20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function formatAddress(address: string, count = 13) {
* @param addr String to validate
* @returns Valid address or not
*/
export const isAddressFormat = (addr: string) => /[a-z0-9_-]{43}/i.test(addr);
export const isAddressFormat = (addr: string) => /^[a-z0-9_-]{43}$/i.test(addr);

/**
* Capitalizes first letters of settings name and replaces "_" with " "
Expand Down

0 comments on commit 8f5fe20

Please sign in to comment.