From 78fe1e5978a1bd1537762ce7f0acb6e30bb33839 Mon Sep 17 00:00:00 2001 From: evilpeach Date: Wed, 3 Jul 2024 01:32:03 +0700 Subject: [PATCH] fix: validator img if moniker is empty string --- src/lib/components/ValidatorBadge.tsx | 2 +- src/lib/components/ValidatorImage.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/components/ValidatorBadge.tsx b/src/lib/components/ValidatorBadge.tsx index 061282fd1..3b272de7e 100644 --- a/src/lib/components/ValidatorBadge.tsx +++ b/src/lib/components/ValidatorBadge.tsx @@ -39,7 +39,7 @@ export const ValidatorBadge = ({ {isMobile && hasLabel && } { const { data, isLoading } = useValidatorImage(validator); - if (!validator) { + if ( + !validator || + !validator.moniker || + validator.moniker.trim().length === 0 + ) { return ( ) : (