Skip to content

Commit

Permalink
Merge pull request #1268 from multiversx/development
Browse files Browse the repository at this point in the history
fix addressValid check
  • Loading branch information
andreigiura authored Sep 23, 2024
2 parents 0cd2b34 + b206065 commit 84b66e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/account/addressIsValid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function canTransformToPublicKey(address: string) {

export function addressIsValid(destinationAddress: string) {
const isValidBach =
destinationAddress.length === 62 && /^\w+$/.test(destinationAddress);
destinationAddress?.length === 62 && /^\w+$/.test(destinationAddress);

return isValidBach && canTransformToPublicKey(destinationAddress);
}

0 comments on commit 84b66e8

Please sign in to comment.