From b2060659fba0df22a611fc4ddcc16b773cd4b855 Mon Sep 17 00:00:00 2001 From: Andrei Date: Mon, 23 Sep 2024 18:38:36 +0300 Subject: [PATCH] fix addressValid check --- src/utils/account/addressIsValid.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/account/addressIsValid.ts b/src/utils/account/addressIsValid.ts index d6a3a5249..3e72e5e75 100644 --- a/src/utils/account/addressIsValid.ts +++ b/src/utils/account/addressIsValid.ts @@ -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); }