From 8f5fe20f8054d6aac46e44a848164a83d5918430 Mon Sep 17 00:00:00 2001 From: nicholas ma Date: Mon, 15 Jul 2024 21:30:18 -0700 Subject: [PATCH] fix: updated is address format util fn to check for 43 length --- src/utils/format.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/format.ts b/src/utils/format.ts index aceb07cc..8216a1bd 100644 --- a/src/utils/format.ts +++ b/src/utils/format.ts @@ -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 " "