Update badge information correctly when updating user profile

This commit is contained in:
yash-signal
2025-09-15 16:06:33 -05:00
committed by GitHub
parent 1da1f9da84
commit ecca208b87

View File

@@ -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,