From ecca208b87bdb0ae005918c7cea3b5c5a8ca81ff Mon Sep 17 00:00:00 2001 From: yash-signal Date: Mon, 15 Sep 2025 16:06:33 -0500 Subject: [PATCH] Update badge information correctly when updating user profile --- ts/util/encryptProfileData.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ts/util/encryptProfileData.ts b/ts/util/encryptProfileData.ts index 0eae8c1c4f..df81281c6a 100644 --- a/ts/util/encryptProfileData.ts +++ b/ts/util/encryptProfileData.ts @@ -73,7 +73,9 @@ export async function encryptProfileData( name: Bytes.toBase64(bytesName), about: bytesAbout ? Bytes.toBase64(bytesAbout) : null, aboutEmoji: bytesAboutEmoji ? Bytes.toBase64(bytesAboutEmoji) : null, - badgeIds: (badges || []).map(({ id }) => id), + badgeIds: (badges || []) + .filter(badge => 'isVisible' in badge && badge.isVisible) + .map(({ id }) => id), paymentAddress: window.storage.get('paymentAddress') || null, avatar: Boolean(newAvatar), sameAvatar,