mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-06-05 02:01:22 +02:00
feat: update _ member pubkey and show username only with gradient
Updates Grimoire member system to use the correct nprofile for _ and displays member usernames without the @grimoire.rocks suffix. Changes: - Update _ member pubkey to 60dfe8bda... (from nprofile with relay hints) - UserName component now shows just the username for Grimoire members - Yellow-orange gradient styling applied to member usernames - Updated nostr.json with new _ pubkey - Fixed all tests to use correct pubkeys Member usernames now display as: - "_" with gradient (not "_@grimoire.rocks") - "verbiricha" with gradient (not "verbiricha@grimoire.rocks")
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"names": {
|
||||
"_": "ce3cd5ba3ae52cec4e4b267fb29f1d2a526a5f4b8e8475d8a603a63c8925295f",
|
||||
"_": "60dfe8bda41b70736ae9a16385fa95c8d76792746c6f5e0a6249223e8779c667",
|
||||
"verbiricha": "7fa56f5d6962ab1e3cd424e758c3002b8665f7b0d8dcee9fe9e288d7751ac194"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export function UserName({ pubkey, isMention, className }: UserNameProps) {
|
||||
const grimoireUsername = getGrimoireUsername(pubkey);
|
||||
const displayName =
|
||||
isGrimoire && grimoireUsername
|
||||
? `${grimoireUsername}@grimoire.rocks`
|
||||
? grimoireUsername
|
||||
: getDisplayName(pubkey, profile);
|
||||
|
||||
// Check if this is the logged-in user
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
|
||||
describe("Grimoire Members", () => {
|
||||
const underscorePubkey =
|
||||
"ce3cd5ba3ae52cec4e4b267fb29f1d2a526a5f4b8e8475d8a603a63c8925295f";
|
||||
"60dfe8bda41b70736ae9a16385fa95c8d76792746c6f5e0a6249223e8779c667";
|
||||
const verbirichaPubkey =
|
||||
"7fa56f5d6962ab1e3cd424e758c3002b8665f7b0d8dcee9fe9e288d7751ac194";
|
||||
const randomPubkey =
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface GrimoireMember {
|
||||
export const GRIMOIRE_MEMBERS: readonly GrimoireMember[] = [
|
||||
{
|
||||
username: "_",
|
||||
pubkey: "ce3cd5ba3ae52cec4e4b267fb29f1d2a526a5f4b8e8475d8a603a63c8925295f",
|
||||
pubkey: "60dfe8bda41b70736ae9a16385fa95c8d76792746c6f5e0a6249223e8779c667",
|
||||
nip05: "_@grimoire.rocks",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -2,15 +2,17 @@ import { describe, it, expect } from "vitest";
|
||||
import { nip19 } from "nostr-tools";
|
||||
|
||||
describe("NIP-19 Decoding for Grimoire Members", () => {
|
||||
it("should decode npub for _ username", () => {
|
||||
const npub =
|
||||
"npub1eras6w483zu6ee8kewfdm97n72fdkfd4e8ujgch0d3jfycfflwhsytskz0";
|
||||
const decoded = nip19.decode(npub);
|
||||
it("should decode nprofile for _ username", () => {
|
||||
const nprofile =
|
||||
"nprofile1qyg8wumn8ghj7mn0wd68ytnddakj7qg4waehxw309aex2mrp0yhxgctdw4eju6t09uq3vamnwvaz7tmhda6zumn0wd68ytnsv9e8g7f0qyfhwumn8ghj7am0wsh82arcduhx7mn99uq35amnwvaz7tms09exzmtfvshxv6tpw34xze3wvdhk6tcpzamhxue69uhhyetvv9ujuurjd9kkzmpwdejhgtcppemhxue69uhkummn9ekx7mp0qqsv37cd82nc3wdvunmvhykajlfl9ykmyk6un7fyvthkceyjvy5lhtcpnnnuw";
|
||||
const decoded = nip19.decode(nprofile);
|
||||
|
||||
expect(decoded.type).toBe("npub");
|
||||
expect(decoded.data).toBe(
|
||||
"ce3cd5ba3ae52cec4e4b267fb29f1d2a526a5f4b8e8475d8a603a63c8925295f",
|
||||
);
|
||||
expect(decoded.type).toBe("nprofile");
|
||||
if (decoded.type === "nprofile") {
|
||||
expect(decoded.data.pubkey).toBe(
|
||||
"60dfe8bda41b70736ae9a16385fa95c8d76792746c6f5e0a6249223e8779c667",
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
it("should decode nprofile for verbiricha username", () => {
|
||||
|
||||
Reference in New Issue
Block a user