1
0
forked from Kieran/snort

bug: profile link hrp wrong

This commit is contained in:
Kieran 2023-06-17 19:55:47 +01:00
parent 4c2a24d278
commit fa823afa33
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -99,7 +99,7 @@ export function eventLink(hex: u256, relays?: Array<string> | string) {
*/
export function profileLink(hex: HexKey, relays?: Array<string> | string) {
const encoded = relays
? encodeTLV(NostrPrefix.Event, hex, Array.isArray(relays) ? relays : [relays])
? encodeTLV(NostrPrefix.Profile, hex, Array.isArray(relays) ? relays : [relays])
: hexToBech32(NostrPrefix.PublicKey, hex);
return `/p/${encoded}`;
}