feat: read nip-58 badges #394

Merged
verbiricha merged 19 commits from badges into main 2023-03-09 10:13:11 +00:00
Showing only changes of commit 98b8ba36bc - Show all commits

View File

@ -43,7 +43,9 @@ export default function useProfileBadges(pubkey?: HexKey) {
(acc: BadgeAwards, addr) => {
const [, pubkey, d] = (addr as string).split(":");
acc.pubkeys.push(pubkey);
acc.ds.push(d);
if (d?.length > 0) {
acc.ds.push(d);
}
return acc;
},
{ pubkeys: [], ds: [] } as BadgeAwards