Skip to content

Commit

Permalink
Merge pull request #447 from arconnectio/arc-425/update-isadressformat
Browse files Browse the repository at this point in the history
fix: updated is address format util fn to check for 43 length
  • Loading branch information
nicholaswma committed Jul 19, 2024
2 parents 4e320c3 + 8f5fe20 commit 622d145
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 622d145

Please sign in to comment.