From 8b25f05e6cd9119c2f248a1cd4c0053b9e8897cc Mon Sep 17 00:00:00 2001 From: boufni95 Date: Sat, 31 Aug 2024 15:24:41 +0000 Subject: [PATCH] enc fix --- src/custom-nip19.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/custom-nip19.ts b/src/custom-nip19.ts index 31eca823..9c1a7eb1 100644 --- a/src/custom-nip19.ts +++ b/src/custom-nip19.ts @@ -70,10 +70,10 @@ export const encodeNoffer = (offer: OfferPointer): string => { const data = encodeTLV({ 0: [hexToBytes(offer.pubkey)], 1: (relays).map(url => utf8Encoder.encode(url)), - 2: [hexToBytes(offer.offer)] + 2: [utf8Encoder.encode(offer.offer)] }); const words = bech32.toWords(data) - return bech32.encode("nprofile", words, 5000); + return bech32.encode("noffer", words, 5000); } const parseTLV = (data: Uint8Array): TLV => {