Skip to content

Commit 6e32991

Browse files
Update badge information correctly when updating user profile
Co-authored-by: yash-signal <[email protected]>
1 parent 2fe33e4 commit 6e32991

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ts/util/encryptProfileData.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ export async function encryptProfileData(
7373
name: Bytes.toBase64(bytesName),
7474
about: bytesAbout ? Bytes.toBase64(bytesAbout) : null,
7575
aboutEmoji: bytesAboutEmoji ? Bytes.toBase64(bytesAboutEmoji) : null,
76-
badgeIds: (badges || []).map(({ id }) => id),
76+
badgeIds: (badges || [])
77+
.filter(badge => 'isVisible' in badge && badge.isVisible)
78+
.map(({ id }) => id),
7779
paymentAddress: window.storage.get('paymentAddress') || null,
7880
avatar: Boolean(newAvatar),
7981
sameAvatar,

0 commit comments

Comments
 (0)