Skip to content

Commit

Permalink
Use correct d-tag for profile badges event
Browse files Browse the repository at this point in the history
Closes #6
  • Loading branch information
verbiricha committed May 22, 2024
1 parent cd34786 commit b284c25
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/badges/hooks/useBadges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { getPow } from "@core/rarity";
export default function useBadges(pubkey: string) {
const profile = useLatestEvent({
kinds: [NDKKind.ProfileBadge],
"#d": ["profile_badges"],
authors: [pubkey],
});
const addresses = profile ? tagValues(profile, "a") : [];
Expand Down
4 changes: 2 additions & 2 deletions apps/badges/ui/badge-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function BadgeSettings({
async function wear() {
const tags = profile
? profile.tags.concat([badge.tagReference(), award.tagReference()])
: [badge.tagReference(), award.tagReference()];
: [["d", "profile_badges"], badge.tagReference(), award.tagReference()];
const ev = {
kind: NDKKind.ProfileBadge,
content: "",
Expand Down Expand Up @@ -51,7 +51,7 @@ export default function BadgeSettings({
}
return true;
})
: [];
: [["d", "profile_badges"]];
const ev = {
kind: NDKKind.ProfileBadge,
content: "",
Expand Down
1 change: 1 addition & 0 deletions apps/badges/ui/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export default function Home() {
const { events: profiles } = useEvents(
{
kinds: [NDKKind.ProfileBadge],
"#d": ["profile_badges"],
authors: [
"1bc70a0148b3f316da33fe3c89f23e3e71ac4ff998027ec712b905cd24f6a411", // karnag
"7fa56f5d6962ab1e3cd424e758c3002b8665f7b0d8dcee9fe9e288d7751ac194", // verbi
Expand Down

0 comments on commit b284c25

Please sign in to comment.