From f186b78ca92ec91e90bde0c7fd348b749c4880e2 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 13 Nov 2025 10:30:26 -0500 Subject: [PATCH] Adds test case for empty d-tags in naddr1 --- .../quartz/nip19Bech32/NIP19ParserTest.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip19Bech32/NIP19ParserTest.kt b/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip19Bech32/NIP19ParserTest.kt index 4fc3a33fb..63198581c 100644 --- a/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip19Bech32/NIP19ParserTest.kt +++ b/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip19Bech32/NIP19ParserTest.kt @@ -147,6 +147,18 @@ class NIP19ParserTest { ) } + @Test + fun nAddrIncompleteParser() { + val result = + Nip19Parser.uriToRoute( + "nostr:naddr1qqqqzxthwden5te0wfjkccte9ejxjanfdejjuanfv3jk7tczyrv4428upmlcujyf2fy4hqrynywj07ukakr99ufvmmw95n5tttj5qqcyqqqgt0qeresua", + ) + assertEquals( + "34236:d95aa8fc0eff8e488952495b8064991d27fb96ed8652f12cdedc5a4e8b5ae540:", + (result?.entity as? NAddress)?.aTag(), + ) + } + @Test fun nAddrParser2() { val result =